camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
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 <> 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:
> <>
> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message