[rabbitmq-discuss] something about rabbitmq
Emile Joubert
emile at rabbitmq.com
Fri Nov 23 17:18:16 GMT 2012
Hi,
On 23/11/12 08:12, liangliangxinxin wrote:
> second recently i use rabbitmq and rabbitmq-c.i met a problem. for
> example i have two threads and set the qos 5000.one thread consume
> messages from the queue and put them in a list .the other get many
> messages from the list and compress them ,then send the them bythe
> socket.when the socket succeed to send them and got a response,i
> acked them.but a few minutes later,the consumer thread can not
> receive messages any more. and in the web gui,i saw there was 0
> messages no-acked in the queue but many messages in the channel. why
> thesehanppened?
If I understand your question correctly, you said you have 2 threads,
and one of them is a consumer. You set qos, and you acknowledge
messages, but messages are not being acknowledged properly.
The condition you describe sounds like the message acknowledgements are
not being made correctly. If no more messages are being delivered then
it could mean the the qos limit has been reached and the broker is
waiting for acknowledgements from the consumer.
If your application has multiple channels then make sure you acknowledge
messages on the same channel that they were received on.
You can use "rabbitmqctl list_queues name messages_unacknowledged" to
diagnose problems with acknowledgements. The number next to each name
should decrease each time an acknowledgement is received by the broker.
You should also check the broker logfile in case there is a relevant
error being reported there.
-Emile
More information about the rabbitmq-discuss
mailing list