You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David MacDonald <da...@cdonald.net.nz> on 2013/07/03 02:19:03 UTC

Re: Choice sendTo and overwriting exchange body

Hi Willem,

I guessed this much. Oracle Service Bus has a service call feature out which
could do callouts to internal routes without affecting the incoming message
which was quite useful. I might see if I can come up with a reusable
Expression that does something similar.

Cheers,
David



--
View this message in context: http://camel.465427.n5.nabble.com/Choice-sendTo-and-overwriting-exchange-body-tp5734867p5735107.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Choice sendTo and overwriting exchange body

Posted by David MacDonald <da...@cdonald.net.nz>.
Hi Willem, 

I made my own ExpressionAdapter which is effectively a copy paste of
ExpressionBuilder.toExpression that accepts an additional boolean for
whether to (shallow) copy the exchange, i.e. Exchange toExchange =
replaceExchange ? exchange : exchange.copy();

I'll raise a JIRA/code sample it soon.

Cheers,
David



--
View this message in context: http://camel.465427.n5.nabble.com/Choice-sendTo-and-overwriting-exchange-body-tp5734867p5735120.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Choice sendTo and overwriting exchange body

Posted by Willem jiang <wi...@gmail.com>.
Maybe we can add an option in sendTo DSL, to let it restore the original Exchange if the option is enabled.
Please feel free to fill a JIRA for it, if you like you can share us with the solution you have.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Wednesday, July 3, 2013 at 8:19 AM, David MacDonald wrote:

> Hi Willem,
>  
> I guessed this much. Oracle Service Bus has a service call feature out which
> could do callouts to internal routes without affecting the incoming message
> which was quite useful. I might see if I can come up with a reusable
> Expression that does something similar.
>  
> Cheers,
> David
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Choice-sendTo-and-overwriting-exchange-body-tp5734867p5735107.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).