/** * @return string */ public function initialize() { $inbox = 'inbox.' . $this->handler->name(); $queue = $this->handler->name(); $this->channel->exchange_declare($inbox, 'topic', false, true, false); $this->channel->exchange_bind($inbox, 'inbox', '', false, new AMQPTable(['to' => '*'])); $this->channel->exchange_bind($inbox, 'inbox', '', false, new AMQPTable(['to' => $this->handler->name()])); $this->channel->queue_declare($queue, false, true, false, false, false); $this->channel->queue_bind($queue, $inbox, '#'); return $queue; }