Thanks for the all the exploration and explanation. 
I offer this summary, for comment:

1. The template starts the route with a Message Exchange Pattern (MEP)
"InOnly" or "InOut", depending on whether we use template.sendBody() or
template.requestBody() respectively

2. The inOut() and inOnly() set the Message Exchange Pattern (MEP) for
whatever they're wrapping. If a to() were used instead, the MEP of the
"sub-route" would be the same as the MEP for the "parent" route. So, using
inOnly() or inOut() makes sense in a context where one wishes to be explicit
for the "sub-route".

3. The MEP used for the "sub-route" determines whether the "parent" route
will wait for the "sub-route" and use the out-message of that sub-route as
the in-message to its next step. 

4. By implication, the MEP of the "sub-route" will not have an effect if the
"sub-route" is always synchronous (or always asynchronous). If the
"sub-route" is always synchronous, it basically does not support being
called with inOnly(). If the sub-route is always asynchronous, it does not
support being called with inOut(). Setting the MEP has no impact on such
routes.

5. Going back to the original question: since "direct:xyz" is always
synchronous, it always works as if it is being called with InOut, regardless
of the MEP on the route.

I'd appreciate being told if I've got some of that wrong.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961p5788072.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to