[rabbitmq-discuss] Consumer does not get error about queue dying
Anuj Agarwal
aagarwal at yellowpages.com
Sat Aug 29 18:23:53 BST 2009
Hi,
So i realize that a queue's data only lives on the rabbit broker that
the queue was created in. It seems like if you have one consumer
connected to that broker and reading from that queue and another
consumer connected to a different broker in the same cluster and reading
from that same queue, then it will not be notified of the error if the
broker holding the queue's msgs is stopped.
Here's the scenario in detail -
* rabbit1 & rabbit2 make up a cluster.
* Publisher P connects to default amq.direct exchange in rabbit1 and
starts writing messages
* Consumer A creates queue named Queue1 in rabbit2 and starts
subscribing to above messages
* Consumer B connects same queue Queue1 in rabbit1 and also starts
subscribing So now, A & B receive messages in a round-robin manner. If i
stop the
rabbit2 node, then Consumer A encounters an exception but Consumer B
does not. I'm using the standard BasicConsume code and calling Dequeue
in a loop.
Is there a way for consumer B to detect this error so i can add code to
recover from it? I saw some threads about a heartbeat functionality but
it seemed like its currently broken. Is that true?
thanks...
--
View this message in context: http://www.nabble.com/Consumer-does-not-get-error-about-queue-dying-tp25204723p25204723.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss
mailing list