コード例 #1
0
 /**
  * @return int
  **/
 public function queueDeclare($name, AMQPQueueConfig $conf)
 {
     try {
         return $this->channel->queueDeclare($name, $conf);
     } catch (AMQPServerException $e) {
         return $this->transportReconnect($e)->queueDeclare($name, $conf);
     }
 }
コード例 #2
0
 /**
  * @param AMQPChannelInterface $channel
  * @param string $label
  * @return int
  */
 protected function queueDeclare(AMQPChannelInterface $channel, $label)
 {
     $this->assertTrue(isset(self::$queueList[$label]));
     return $channel->queueDeclare(self::$queueList[$label]['name'], AMQPQueueConfig::create()->setDurable(true)->setArguments(self::$queueList[$label]['args']));
 }