/** * 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']); } }
public function testDefaultExchangesAreNotDurable() { $connection = new Connection('default', 'localhost', null, 'user', 'password'); $exchange = new Exchange('ex-1', 'fanout', null, $connection); $this->assertFalse($exchange->isIsDurable()); }