Hi,

I took a look at your requirement and do not quite get why the need for
ExchangePattern.InOptionalOut. A standard In-Out can solve this requirement
just as easily.

If your requirement needs you to send a transformed message to a different
destination along the way while processing the original message and
returning a response to the sender, why not use a "wiretap" in the secondary
route which is designed to do exactly that... The wiretap forks the message
and sends a copy to a different destination. If this copy needs to be
transformed, a little sub-route could do exactly that before sending it off
to the destination.

The original or a transformed message can be sent back as a response to the
client by the original route.  

The ExchangePattern.InOptionalOut is a "message exchange"
pattern/understanging between the route-invoking client and the route
consumer (aka server). It requires the clients to be aware of this pattern
running on the server and expect/not expect responses from the server
correctly. I cannot see how this pattern solves your requirement to fork the
message to different endpoint while sending back a response to the client.

Hope this helps.

Cheers,

Ashwin...

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
CamelOne 2011: http://fusesource.com/camel2011 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/MEP-InOptionalOut-correct-behavior-for-exchange-bodies-tp4431556p4441902.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to