예제 #1
0
 protected function createConsumer($name)
 {
     $conf = $this->config['consumers'][$name];
     $conn = $this->connFactory->getConnection($conf['connection']);
     $consumer = new Consumer(new AMQPChannel($conn));
     $consumer->setQueueOptions($conf['queue_options']);
     $this->consumers[$name] = $consumer;
     return $consumer;
 }
예제 #2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testThrowsExceptionOnUnknownConnection()
 {
     $cf = new ConnectionFactory([]);
     $cf->getConnection('someName');
 }