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.

Reply via email to