You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by tkatva <tu...@gmail.com> on 2011/12/01 20:18:25 UTC

Endpoint exception

It's me again...  

I was wondering that if I have Route and I have defined onException-method
to catch all exceptions, like:

routeDef.onException(Exception.class).Process(...Jaadi jaadi processing); It
does not catch exceptions happening in the polling endpoint... Is that
because I am doing something wrong or is there something wrong with this
logic ?

Let's say I have polling email client and I want to catch and process all
exceptions, including if have defined imap server port wrong, then how do I
do that ?

Thank you again

Best Regards Tuomas Katva

--
View this message in context: http://camel.465427.n5.nabble.com/Endpoint-exception-tp5039663p5039663.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Endpoint exception

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Dec 1, 2011 at 8:18 PM, tkatva <tu...@gmail.com> wrote:
> It's me again...
>
> I was wondering that if I have Route and I have defined onException-method
> to catch all exceptions, like:
>
> routeDef.onException(Exception.class).Process(...Jaadi jaadi processing); It
> does not catch exceptions happening in the polling endpoint... Is that
> because I am doing something wrong or is there something wrong with this
> logic ?
>
> Let's say I have polling email client and I want to catch and process all
> exceptions, including if have defined imap server port wrong, then how do I
> do that ?
>

If you have the Camel in action book, then see p123 and read from
there. It explains where the Camel onException / errorHandler works.

Basically before an Exchange is created and passed from the consumer
to the Camel routing engine, then if any error happens prior, then if
any error handling exists, is consumer specific how they deal with
that.

The scheduled consumers, most likely will log a WARN and just retry later.

Others such as a JMS consumer, may be able to failover or re-connect etc.




> Thank you again
>
> Best Regards Tuomas Katva
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Endpoint-exception-tp5039663p5039663.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/