Exemplo n.º 1
0
 /**
  * Bootstrap the connection
  *
  * @return void
  * @throws \GraphAware\SimpleMQ\Exception\SimpleMQException
  */
 public function run()
 {
     parent::run();
     $this->channel->queue_declare($this->queue->getName(), false, $this->queue->isDurable(), $this->queue->isExclusive(), $this->queue->isAutoDelete());
     foreach ($this->bindings as $binding) {
         $this->channel->queue_bind($this->queue->getName(), $this->exchange->getName(), $binding['routing_key']);
     }
 }
Exemplo n.º 2
0
 public function testQueueIsMarkedAsAutoDelete()
 {
     $queue = new Queue('my-queue', null, true);
     $this->assertTrue($queue->isAutoDelete());
     $this->assertFalse($queue->isDurable());
 }