/**
  * @param BusContextInterface $busContext
  *
  * @throws UnexpectedValueException
  */
 public function start(BusContextInterface $busContext)
 {
     if ($this->daysToKeepDeduplicationData === null) {
         $this->daysToKeepDeduplicationData = 7;
     } elseif (!ctype_digit((string) $this->daysToKeepDeduplicationData)) {
         throw new UnexpectedValueException("Invalid value value used for days to keep deduplication data. Please ensure it is a positive integer.");
     }
     $this->outboxPersister->removeEntriesOlderThan($this->now->sub(new \DateInterval("P{$this->daysToKeepDeduplicationData}D")));
 }
 /**
  * @param BusContextInterface $busContext
  */
 public function start(BusContextInterface $busContext)
 {
     $endpointId = $this->outboxPersister->fetchOrGenerateEndpointId($this->endpointName);
     $this->settings->set(Doctrine2KnownSettingsEnum::OUTBOX_ENDPOINT_ID, $endpointId);
 }
 /**
  * Rolls back the transaction
  *
  * @return void
  */
 public function rollBack()
 {
     $this->persister->rollBack();
 }