[rabbitmq-discuss] current queue size is always different with a real queue size. actually, it is always same with actual queue size - prefetch size.

Simon MacMullen simon at rabbitmq.com
Fri Nov 16 10:06:34 GMT 2012


On 16/11/12 07:27, Henry JunYoung Kim wrote:
> but, on this, I found that current queue size is always different with a
> real queue size. actually, it is always same with actual queue size -
> prefetch size.

Well - if you have a prefetch count of 5 then the first 5 messages you 
publish will go straight out for delivery - they're not available to 
other consumers.

rabbitmqctl and rabbitmq_management expose three different counts:

messages_ready -number of messages that could be consumed by a new consumer

messages_unacknowledged - number of messages out for delivery

messages - total of the above two

But queue.declare-ok only gives us one space to fill - so we fill it 
with the equivalent of messages_ready.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list