/** * @param Queue $queue * * @return $this */ public function addQueue(Queue $queue) { if ($this->hasQueue($queue->name())) { throw new \InvalidArgumentException(sprintf('Queue "%s" already defined', $queue->name())); } $this->queues[$queue->name()] = $queue; return $this; }
/** */ public function initialize() { if ($this->initialized) { return; } $this->initialized = true; $this->exchange->initialize(); $this->queue->initialize(); $this->channel->queue_bind($this->queue->name(), $this->exchange->name()); }