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: error handling query
Date Tue, 02 Oct 2012 08:24:30 GMT
On Mon, Oct 1, 2012 at 8:58 PM, gilboy <josephotoole@gmail.com> wrote:
> Hi
>
> I noticed that most endpoint consumers do something like the following:
>
> try{
>    getprocessor().process(exchange);
> } catch (exception e){
>    getExceptionHandler.handleException();
> }
>
> Assume I have a route which consumes data from an endpoint whose consumer
> uses the above logic. Also assume that the route is a simple pipeline which
> has 4 processors and I define the default error handler to have 5 retries.
>
> If an exception is thrown in the first processor will camel try to replay
> the exchange through the first processor 4 more times?
>
> I am certain that camel will try to replay the exchange if processor 2-4
> throw an exception but not clear to me how it will behave if the first
> processor throws an exception
>

The error handler in the routing engine will kick in and handle errors.
The code above is just as a fail safe for a consumer.

If you got the Camel in Action book see section 5.1.2.

And read about error handling as well (and follow the links)
http://camel.apache.org/error-handling-in-camel.html

> Thanks
> Joe
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/error-handling-query-tp5720326.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



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

Mime
View raw message