You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ishada <ab...@gmail.com> on 2015/11/17 10:13:36 UTC
catch exception in camel
errorHandler(deadLetterChannel("file:somelocation");
from("jms:queuwlocation").to(
"file:someLocation");
I have read that camel error handling comes when there's a processing
between two nodes, such as Processor, Predicate etc. But what if I cannot
consume the message, in my case the camel cannot connect to jms. How should
I log this exception ?. As I am trying to use a deadLetterChannel to send
the message to filesystem, but since I have not received the message there
is nothing new on the file location. how should I encounter this type of
situation?
--
View this message in context: http://camel.465427.n5.nabble.com/catch-exception-in-camel-tp5773978.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: catch exception in camel
Posted by souciance <so...@gmail.com>.
You reported this on stackoverflow. Please provide your code to help you out
more and what errors you get.
--
View this message in context: http://camel.465427.n5.nabble.com/catch-exception-in-camel-tp5773978p5774013.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: catch exception in camel
Posted by Antonin Stefanutti <an...@stefanutti.fr>.
The component would generally do the logging for you while trying to recover from the error.
As for the JMS component specifically, it exposes a couple of options to configure error handling that you can use, namely:
exceptionListener, errorHandler, errorHandlerLoggingLevel, errorHandlerLogStackTrace
You can configure as well the interval between to recovery attempt with the 'recoveryInterval' option.
See http://camel.apache.org/jms.html#JMS-Alltheotheroptions
> On 17 Nov 2015, at 10:13, Ishada <ab...@gmail.com> wrote:
>
> errorHandler(deadLetterChannel("file:somelocation");
>
> from("jms:queuwlocation").to(
> "file:someLocation");
>
> I have read that camel error handling comes when there's a processing
> between two nodes, such as Processor, Predicate etc. But what if I cannot
> consume the message, in my case the camel cannot connect to jms. How should
> I log this exception ?. As I am trying to use a deadLetterChannel to send
> the message to filesystem, but since I have not received the message there
> is nothing new on the file location. how should I encounter this type of
> situation?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/catch-exception-in-camel-tp5773978.html
> Sent from the Camel - Users mailing list archive at Nabble.com.