[rabbitmq-discuss] Is there a pika bug with the prefetch?

Charles Law charles.law at openx.com
Tue Aug 14 06:16:18 BST 2012


I have a Python client that consumes from a set of queues with no_ack set 
to False.  I assumed that doing this would mean that single consumer would 
receive only 1 message until the consumer returned an acknowledgment.  By 
receive a message I mean my callback would be called.

I recently was testing support for messages that tell the consumer to 
declare additional queues.  I planned on doing this by acknowledging the 
original message after I ran my queue_declare and queue_bind calls.  While 
testing, I noticed that the on_message_receive callback function was 
receiving other messages *before* my consumer finished the declares/binds, 
and *before* I acknowledged the original message.  Is this how Rabbit is 
supposed to work?  Or is this a Pika bug?

When I set prefetch_count to 1, everything works how I expect.  I assumed 
with the default prefetch_count, or even a prefetch count > 1, that the 
client would receive messages, but should hold onto them until the 
acknowledgement for the original message goes out.  Is this correct?
Thanks,
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120813/e68482c6/attachment.htm>


More information about the rabbitmq-discuss mailing list