Skip to content

Commit 93a721f

Browse files
committed
Merge pull request #203 from careerlinkvn/fix-for-multiple-consumer-cancelling-issue
Bugfix in the basic_cancel() processing for multiple-consumer
2 parents a6f0c78 + 1add739 commit 93a721f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

RabbitMq/MultipleConsumer.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,11 @@ public function processQueueMessage($queueName, AMQPMessage $msg)
6565

6666
$this->handleProcessMessage($msg, $processFlag);
6767
}
68-
}
68+
69+
public function stopConsuming()
70+
{
71+
foreach ($this->queues as $name => $options) {
72+
$this->getChannel()->basic_cancel($this->getQueueConsumerTag($name));
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)