[rabbitmq-discuss] problem on queue depth checking?

sameekmishra sameek at arosys.com
Tue Mar 13 13:47:48 GMT 2012


Defining the channel.basicQos(1) consumer will pick one message and do not
pick any message from queue until it not got acknowledgement,if u think that
consumer will consume all message from queue that's because I got queue
depth zero but This may not be the case as.

What i am thinking is that we need to define channel.basicQos(1) only in the
consumer code not in queueDepth because it only give the total count of
message.

Even after defining the channel.basicQos(1) on consumer end, I am getting
queuedepth value 0,which should be one. may other reason behind that i am
getting wrong result.

Thanks
Sameek


Simon MacMullen-2 wrote:
> 
> On 13/03/12 13:01, sameekmishra wrote:
>> Now if i publish 2 messages then one message will be consumed(and thread
>> will sleep for one minute) and one will be in the queue;
>> And queue depth checking thread must show the queuedepth = 1. But I am
>> getting the queuedepth 0.
>> But if we dont consume the message from queue then queuedepth is shown
>> correctly.
> 
> RabbitMQ will by default push as many messages to the consumer as it 
> can. On the consumer side they end up buffered in the QueueingConsumer.
> 
> To change this behaviour, invoke channel.basicQos() and use acks. This 
> will bound the number of unacknowledged messages RabbitMQ will push to 
> your consumer.
> 
> Cheers, Simon
> 
> -- 
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> 
-- 
View this message in context: http://old.nabble.com/problem-on-queue-depth-checking--tp33494003p33494378.html
Sent from the RabbitMQ mailing list archive at Nabble.com.



More information about the rabbitmq-discuss mailing list