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: Canonical Way to Create a New Message Given Certain Conditions
Date Sat, 20 Jul 2013 08:57:52 GMT
Hi

If its a new inbound message maybe you can use an intercept from and
then do your check / whatever you want
http://camel.apache.org/intercept

On Tue, Jul 16, 2013 at 2:13 PM, al94781 <andrew@harmel-law.com> 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.
>
> TIA
>
> Cheers, Andrew
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Canonical-Way-to-Create-a-New-Message-Given-Certain-Conditions-tp5735721.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message