Ejemplo n.º 1
0
 /**
  * @param bool $forceNewChannell
  *
  * @return void
  */
 protected function openChannel($forceNewChannell = false)
 {
     if (true == $forceNewChannell || false == $this->channel instanceof AMQPChannel) {
         $this->channel = $this->connection->channel();
         $this->logger->info('New channel opened!', [$this->channel->getChannelId()]);
     }
 }
Ejemplo n.º 2
0
 /**
  * Return internal channel ID
  *
  * @return integer
  */
 public function getChannelId()
 {
     return $this->channel->getChannelId();
 }
 public function onPrepareTransactionCommit(UnitOfWorkInterface $unitOfWork, $transaction)
 {
     if (($this->getTerminalProperty('isTransactional') || $this->getTerminalProperty('waitForAck')) && $this->isOpen && null === $this->channel->getChannelId()) {
         throw new EventPublicationFailedException("Unable to Commit UnitOfWork changes to AMQP: Channel is closed.");
     }
 }