/var/www/vhosts/nabawater/vendor/mikemadisonweb/yii2-rabbitmq/components
NameSizeModeActions
AbstractConnectionFactory.php31630644editdlrm
BaseConsumer.php33030644editdlrm
BaseRabbitMQ.php71180644editdlrm
Consumer.php97540644editdlrm
ConsumerInterface.php6440644editdlrm
MultipleConsumer.php26080644editdlrm
Producer.php28300644editdlrm
ProducerInterface.php3230644editdlrm
RabbitMQConsumerEvent.php3680644editdlrm
RabbitMQEvent.php3600644editdlrm
RabbitMQPublisherEvent.php3690644editdlrm
Edit: /var/www/vhosts/nabawater/vendor/mikemadisonweb/yii2-rabbitmq/components/MultipleConsumer.php (2608B)
getConsumerTag(), $queue); } /** * @param array $queues */ public function setQueues(array $queues) { $this->queues = $queues; } protected function startConsuming() { if ($this->autoSetupFabric) { $this->setupFabric(); } foreach ($this->queues as $name => $options) { //PHP 5.3 Compliant $currentObject = $this; $this->getChannel()->basic_consume($name, $this->getQueueConsumerTag($name), false, false, false, false, function (AMQPMessage $msg) use ($currentObject, $name) { $currentObject->processQueueMessage($name, $msg); }); } } protected function queueDeclare() { foreach ($this->queues as $name => $options) { $options = array_merge($this->queueOptions, $options); list($queueName, ,) = $this->getChannel()->queue_declare( $name, $options['passive'], $options['durable'], $options['exclusive'], $options['auto_delete'], $options['nowait'], $options['arguments'], $options['ticket'] ); if (isset($options['routing_keys']) && count($options['routing_keys']) > 0) { foreach ($options['routing_keys'] as $routingKey) { $this->queueBind($queueName, $this->exchangeOptions['name'], $routingKey); } } else { $this->queueBind($queueName, $this->exchangeOptions['name'], $this->routingKey); } } $this->queueDeclared = true; } /** * @param $queueName * @param AMQPMessage $msg * @throws \Exception */ public function processQueueMessage($queueName, AMQPMessage $msg) { if (!isset($this->queues[$queueName])) { throw new \Exception('Queue not found!'); } $this->processMessageQueueCallback($msg, $queueName, $this->queues[$queueName]['callback']); } public function stopConsuming() { foreach ($this->queues as $name => $options) { $this->getChannel()->basic_cancel($this->getQueueConsumerTag($name), false, true); } } }