I'm working on CAMEL-8742 where RabbitMQ consumers will never reconnect if
the RabbitMQ channel gets closed.

Its actually really easy to detect when the channel is closed because the
com.rabbitmq.client.Consumer interface has a handleShutdownSignal() method
that will get called. However I would appreciate some advice on what do when
we detect a remote shutdown.

Should we:
a) Stop the consumers and call restart() (which will start up another thread
to get a connection then start new consumers).
b) Refactor the consumers constructor to pass in a Connection instead of
Channel. Then have the consumer keep trying to get a channel until it
connects again?

The way the code is currently written it would be easy to go with option
A... but it doesn't seem right to stop all the consumer threads and restart
them. Thoughts?



--
View this message in context: 
http://camel.465427.n5.nabble.com/CAMEL-8742-RabbitMQ-consumer-reconnect-tp5776264.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to