[rabbitmq-discuss] the meaning of prefetch ?

Emile Joubert emile at rabbitmq.com
Wed Oct 24 10:25:17 BST 2012

Hi Andy,

On 24/10/12 09:56, 林涵 wrote:
> Thanks for you answers .  if we have a queue ,and many consumers
> subscribe the queue,these consumers  has  a common prefetch
> value,assuming it is 20.if the queue has 20 msg , the rabbitmq will send
> the whole msg to one queue or every queue ?. if send to one ,it means
> other consumers will be idle  ?  

If the number of messages in the queue is the same as the prefetch count
of all consumers then one consumer will get all the messages in the
queue (until more messages arrive in the queue). This means that other
consumers will be idle.

You can make this outcome less likely by using a smaller prefetch count.


More information about the rabbitmq-discuss mailing list