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: Exception in the DeadLetterChannel causes message to be consumed
Date Fri, 23 Jul 2010 05:43:09 GMT
Hi

Camel does not swallow exceptions. Setting the exception on the
Exchange is how exceptions is represented in Camel. This is by design.
The consumer should check the Exchange if its failed and if there was
an exception by the getException method on the Exchange.

Can you provide a sample application with your route and which
demonstrates your issue?

And btw why are you using CLIENT ACK mode? Is there a special reason for that?
Using TRANSACTED allows the broker to rollback and re-submit the message.



On Thu, Jul 22, 2010 at 3:32 PM, kumaap <amitesh.a.kumar@gmail.com> wrote:
>
> Ive upgraded to 2.4
>
> and the same thing is still happing
>
> AsyncProcessorTypeConverter
>
> public boolean process(Exchange exchange, AsyncCallback callback) {
>            if (processor == null) {
>                // no processor then we are done
>                callback.done(true);
>                return true;
>            }
>            try {
>                processor.process(exchange);
>            } catch (Throwable e) {
>                // must catch throwable so we catch all
>                exchange.setException(e);   <-- Sets an exception when
> failure processor fails
>            } finally {
>                // we are bridging a sync processor as async so callback
> with true
>                callback.done(true);
>            }
>            return true;
>        }
>
> Then carries on and acts like nothing has happened. I cant see any code that
> checks if an exception happen in processing the failureProcessor
>
> Thanks in advance kumaap
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Exception-in-the-DeadLetterChannel-causes-message-to-be-consumed-tp1835181p1842280.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message