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

Francesco Mazzoli francesco at rabbitmq.com
Wed Aug 15 14:06:49 BST 2012

At Mon, 13 Aug 2012 22:16:18 -0700 (PDT),
Charles Law wrote:
> 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?

The prefetch_count qos exists precisely for that purpose - to regulate how many
messages will be fetched without receiving ack, see

So if you want the consumer not to receive messages while it's acking previous
ones, set the prefetch_count to 1.  The tutorials have examples regarding this
as well: <http://www.rabbitmq.com/tutorials/tutorial-two-python.html>.

Francesco * Often in error, never in doubt

More information about the rabbitmq-discuss mailing list