You can use Camel error handling to retry
http://camel.apache.org/error-handling-in-camel.html

But since your route input is from ActiveMQ you can also use
transactions, and let ActiveMQ do the redelivery, as that would
preserve the message in the broker, in case of a crash etc.

Camel error handler is in-memory so if Camel crash the message is lost.

For TX see
http://camel.apache.org/transactional-client.html

And also the docs at ActiveMQ how to configure its redelivery settings
and DLQ etc

And you can find some 3rd party blogs about error handling and TX at
http://camel.apache.org/articles.html

And also covered in the Camel in Action book chapter 5 and 9

On Sat, Nov 9, 2013 at 10:47 AM, brenuart <[email protected]> wrote:
> Suppose the following route:
>
>    from("activemq:input")
>       .to("mongodb:mymongo?database=...")
>
> How should I handle the unavailability of the MongoDB?
> Since it is a transient failure, I'd like to retry later when the db is back
> online...
>
> Should I tell CAMEL to retry "forever" (or at least long enough) until it
> goes through ?
> Or should I let Camel fail and tell ACTIVEMQ to retry ?
> What is the solution usually applied for this kind of scenario ?
>
> Thx
>
> /Bertrand
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Handling-failures-due-to-endpoint-temporary-unavailability-tp5742920.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to