camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel-rabbitmq - how to handle endpoint not available?
Date Wed, 06 Nov 2013 08:20:04 GMT
Hi

Is it only rabbitmq endpoints as producers you use (eg .to rabbit) and
not consumers?

1)
Some components has an lazyCreateSession option that will only create
the connection on demand. So in that case the route will be able to
startup, and on 1st message the producer will create a connection and
if it fails, then the Camel error handler can react.

On the consumer side its more tricky as you would need a background
job that re-attempts to get a connection to the rabbit broker.

Maybe we can add such functionality to camel-rabbitmq.

2)
All this failover and reconnect stuff is built-in out of the box with
Apache ActiveMQ on its client side. Wonder if rabbit don't have that
as well? So its a matter of configuring it using some api on the
rabbit client, and then expose that api/options to the camel-rabbit
component, so people can configure it.

So maybe check for #2 first and if there is no such thing from rabbit
client, we can take a look at #1

On Tue, Nov 5, 2013 at 11:56 PM, Sell, Matt <matt.sell@fluke.com> wrote:
>
> I'm trying to use Camel embedded into an application (Spring configured) to push files
from  a local directory to an instance of RabbitMQ. It's been working well so far, except
in the case where RabbitMQ is not available for some reason (network outage, maintenance,
etc.), and our application is started. In this case, Camel is unable to start because the
endpoint is not available (FailedToCreateProducerException resulting from a "connection refused").
>
> Is it possible to recover from such an error? The ideal situation would be to allow a
configuration where redelivery attempts could be made in the hope that RabbitMQ will become
available again. Our application that is using Camel is deployed on several hundred workstations
and it would be necessary to configure Camel in such a way that recovery (reconnect to Rabbit)
would be automatic.
>
> Any ideas? There doesn't appear to be a way to configure Camel using the available Exception
handling strategies to operate in this manner, although my guess is that I've missed something.
>
> Thanks!
>
>
>
>         - Matt
>
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message