public function onRollback(UnitOfWorkInterface $unitOfWork, \Exception $failureCause = null)
 {
     try {
         if ($this->getTerminalProperty('isTransactional')) {
             $this->channel->tx_rollback();
         }
     } catch (\Exception $ex) {
         $this->logger->warn("Unable to rollback transaction on channel.", $ex);
     }
     $this->closeTerminal();
     $this->isOpen = false;
 }
 private function tryRollback(AMQPChannel $channel)
 {
     try {
         $channel->tx_rollback();
     } catch (\Exception $ex) {
         $this->logger->debug("Unable to rollback. The underlying channel might already be closed.");
     }
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function rollbackTransaction()
 {
     $this->channel->tx_rollback();
 }