I have checked the code of PatternDefinition.inOnly(...) and this just calls the PatternDefinition.to(...) method with the ExchangePattern set to InOnly.
So let us forget the method inOnly(). What does it mean to set the ExchangePattern to "InOnly" (or even "InOut")? There are various ways how this can be done; .setExchangePattern(), .to(ExchangePattern e), .inOnly(...), inOut(...), etc. Is the ExchangePattern parameter just a flag which the called endpoint can ignore? For example the following code [code] from("jetty:http://localhost:8282/") .inOnly("direct:BBB") .process(new Processor(){ public void process(Exchange e){ System.out.println("AAA: Exchange Pattern is: " + e.getPattern()); } }); from("direct:BBB") .process(new Processor(){ public void process(Exchange e){ System.out.println("BBB: Exchange Pattern is: " + e.getPattern()); } }); [/code] As expected prints: > BBB: Exchange Pattern is: InOnly > AAA: Exchange Pattern is: InOut So is the ExchangePattern just a FLAG which the called endpoints can wrap logic around or ignore? Ranx wrote > I'm not even sure what an InOnly to a direct endpoint means quite frankly -- View this message in context: http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961p5788063.html Sent from the Camel - Users mailing list archive at Nabble.com.