[rabbitmq-discuss] BrokerUnreachableException on specific thread after node goes down
Patrick Long
pat at munkiisoft.com
Tue Feb 25 09:40:45 GMT 2014
Rabbit 3.2.1
.Net Client
F5 Load balancer
2 node cluster
I am trying to debug an issue with our dequeueing code and a cluster. We
have a Windows service that starts up with three threads each maintaining
its own instance of IModel. That Model is reused each time the thread loops
around to Dequeue a message.
I am testing how well our Windows service stands up to a node going down. I
do this by simply stopping the Rabbit MQ service on the Master node.
In our Windows Service I catch the OperationInterruptedException and
AlreadyClosedException exceptions. When caught I set that thread's Model to
null and it will be recreated the next time around the Dequeue loop.
This approach works fine when the Queues are empty and the loop time is
infrequent.However when I take the node down and our Windows service is
dequeuing and\or Acking messages I hit a problem on one of the threads.
As an example threads 1 and 2 will both catch separate instances of
AlreadyClosedException and reset their IModel. Next time around Thread 1
will reconnect its Model and start dequeueing but Thread 2 will get
a BrokerUnreachableException. I have tried retrying that reconnect with
some Thread.Sleep delays and it does not help. Once "broken" that thread
gets BrokerUnreachableException every time.
Any ideas as to why this might be?
Thanks
--
Patrick Long - Munkiisoft Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140225/8fa495f4/attachment.html>
More information about the rabbitmq-discuss
mailing list