[rabbitmq-discuss] Network failures recovery with RabbitMQ Javaclient

Michael Klishin michael.s.klishin at gmail.com
Fri Dec 9 15:00:03 GMT 2011


Le 09/dic/2011 à 18:50, Busoli, Simone a écrit :

> With regards to threading I've found that keeping the library thread safe by enqueueing publishes into an in-memory thread-safe queue which gets emptied by a single thread (on the publisher side) and having a single thread consuming from all the rabbit queues and marshaling the received messages into the application to work quite well,

Simone,

Thank you, this is exactly what I have in mind for publishers. For consumers there is a bunch of questions that need to be answered:

1. Should recovering apps redeclare AMQP entities they use or use passive declares?
2. If I have 3 threads each with its own consumer (on separate channels, of course), how do I go about reopening their channels after AMQP connection is back up?
3. How do I detect that reconnection has succeeded?

So if I understand it correctly, your approach is to have one thread that consumes all messages and then dispatches them to different parts of the application, is my understanding correct?

MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin



More information about the rabbitmq-discuss mailing list