camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: CAMEL-8742 RabbitMQ consumer reconnect
Date Fri, 15 Jan 2016 07:04:24 GMT

Yeah the other components that can re-connect do it like B. I think we
should refactor the code, which is fine to introduce in Camel 2.17

So I suggest to go with B.

On Thu, Jan 14, 2016 at 11:29 PM, unleashed85 <> wrote:
> 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:
> Sent from the Camel Development mailing list archive at

Claus Ibsen
----------------- @davsclaus
Camel in Action 2:

View raw message