camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Canonical Way to Create a New Message Given Certain Conditions
Date Sat, 20 Jul 2013 08:57:52 GMT

If its a new inbound message maybe you can use an intercept from and
then do your check / whatever you want

On Tue, Jul 16, 2013 at 2:13 PM, al94781 <> wrote:
> Hi there,
> We have a situation in our route whereby, when we encounter an error in
> processing an inbound message, we want to flag the original as "Failed" (in
> a header) prior to further processing, and also generate a new message to
> request a tidy up of resources the original failure may have left behind
> which we put on a new request queue.
> The question I have is therefore: What is the canonical way to achieve this
> with Camel?
>  - A splitter isn't the right way as the new (tidy up) message is not in the
> original message to split it out.
>  - A wiretap feels like it might be a possibility, (looking for messages
> with a "Failed" header, and reacting as a result by creating the new
> message) but I'm not clear if this can operate within the original
> transaction (we can't lose messages, and want to ensure a failure at least
> guarantees a clean up is attempted).
>  - Alternatively we can just use a plain old processor, but this feels as if
> we're missing something and a little ad-hoc.
> Can anyone help?  We're pretty sure this must be a very common use case.
> Cheers, Andrew
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message