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: how does camel handle runtime exceptions?
Date Tue, 27 Sep 2011 08:23:21 GMT
Hi

You can read about error handling here
http://camel.apache.org/error-handling-in-camel.html

The exception will by default be propagated back to the consumer.
So in this case the JMS consumer. And it will by default log the exception.

You can enable JMS transaction and thus have the JMS consumer to
rollback the TX.
And have the message redelivered.

For that you need TX
http://camel.apache.org/transactional-client.html



On Mon, Sep 26, 2011 at 7:53 PM, Davis Ford <dford@axeda.com> wrote:
> Hi, just curious how would camel handle a runtime exception in this routing example:
>
> from("jms:someQueue").beanRef("someBean", "doSomething");
>
> If bean#doSomething() throws a RuntimeException?  Is the exception just logged and swallowed?
 I'm mainly just interested in understanding if it will affect future processing of messages
that show up on the queue.
>



-- 
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/

Mime
View raw message