[rabbitmq-discuss] What happens to messages delivered just before canceling consume?

Chris ctlajoie at gmail.com
Thu May 17 18:33:45 BST 2012


At some point in my consume loop, after acking a message, I need to
stop consuming (temporarily). I will have multiple consumer processes
running and the others must pick up the slack while this one is out of
the loop. I am using a prefetch count of 1, so I assume it's possible
for there to be 1 additional message delivered to my consumer *after*
I ack the final message, but *before* I cancel the consumer.

I have 2 questions regarding this additional message:
 1. If I do nothing, will it be eventually returned to the queue for
processing by another consumer?
 2. After doing basic.cancel to stop my consumer, can I read in the
aditional message and nack it, returning it to the queue?


More information about the rabbitmq-discuss mailing list