[rabbitmq-discuss] Script/Connection not getting terminated.
Michael Klishin
michael.s.klishin at gmail.com
Fri Jun 7 11:20:11 BST 2013
2013/6/7 tluck <tilak.chauhan at ymail.com>
> while ($msg = $channel->basic_get($queue)) {
> consumerMessage($msg, $connection, $channel);
> }
>
I suspect this code uses automatic acknowledgement mode. In other words,
RabbitMQ considers the message acknowledged as soon as
it sends it out.
If you want to use explicit acks (it only makes sense if you want messages
to be requeued
in case your consumer crashes), you need to specify it as an extra argument
to basic.get.
Alternatively you can stop using explicit acks. In that case a consumer
that fails before the messages is
processed will cause the message to be lost.
--
MK
http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130607/5672e132/attachment.htm>
More information about the rabbitmq-discuss
mailing list