[rabbitmq-discuss] How to achieve HA consumers?
johnson at edocom.cn
Thu Sep 6 03:00:31 BST 2012
Now I am clear about it. So for my scenario, using the token queue is the better solution. I have tried it and it works fine.
From: Matthias Radestock
Date: 2012-09-05 22:14
Subject: Re: [rabbitmq-discuss] How to achieve HA consumers?
On 05/09/12 14:51, johnson wrote:
> The message-count is correct but the consumer-count is changed from 1
> to 0. I don't know why.
That is due to a subtlety in the meaning of consumer-count in the AMQP
Reports the number of *active* consumers for the queue.
Rabbit's interpretation of "active consumer" is "a consumer to which a
message can be sent". Since your consumer channels have a qos prefetch
count of 1, once a message has been sent to a consumer no further
messages can be sent to it until it acks the message. Until then the
consumer is inactive and hence won't be included in the consumer-count
returned by queue.declare-ok.
The RabbitMQ management API/UI isn't bound by AMQP semantics, so it
always reports all consumers, active or not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss