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: Route-scoped errorHandler and useOriginalMessage problem
Date Thu, 17 Jan 2013 14:05:36 GMT
On Thu, Jan 17, 2013 at 11:15 AM, ncolomer <ncolomer@octo.com> wrote:
> Hi Camel community,
>
> I'm back with another issue, about Route-scoped errorHandler this time.
>
> I have several Routes that have their own errorHandler. Each of these
> errorHandlers delegates Exceptions to a mutualized deadLetterChannel Route.
> The deadLetterChannel Route finally persists on disk the original Route's
> message (useOriginalMessage enabled) in order to be re-played later.
>
> The problem comes when I try to replay a File: I use a File Endpoint that
> read the file, convert its body to its original form, and then route the
> message to the original Route. But if this Route fails again, the
> deadLetterChannel is triggered with the wrong message (I see a GenericFile
> instead of the Type originally received by the Route).
>
> To sum this up, it seems the Route-scoped useOriginalMessage doesn't run as
> expected, as the message received by the target is always the initial
> message of the Exchange and not the one received by the route that failed
> (what I expect when I declare a Route-scoped errorHandler).
>
> You'll find as attachement a failing unit test that illustrates my problem:
>
> OriginalMessageDLCTest.java
> <http://camel.465427.n5.nabble.com/file/n5725682/OriginalMessageDLCTest.java>
>
> Any idea? Is it the expected behavior?
>

Yes useOriginalMessage is always the original message when the
Exchange was first created.


> Best regards,
> Nicolas
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Route-scoped-errorHandler-and-useOriginalMessage-problem-tp5725682.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