Question

After first misspelling i wanted typed support for my predicate expression. So turned to

header(Exchange.FILE_NAME) 

as in ...

from("file://src/test/resources/routingtodifferentdestinations-source?noop=true")//
.choice()//
.when(header(Exchange.FILE_NAME).contains("widget.txt"))//

(Q) Where/How happens the distinction between "header.in" and "header.out" in that API.

The equivalent case written in simple, where the distinction is made between in.header and out.header is made explicit:

simple("${in.header.CamelFileName} contains 'widget.txt'"

Thanks

Was it helpful?

Solution

You dont need to concern about IN vs OUT really. Just use IN always. Or better yet do not use in at all, as that is implied, eg ${in.headers.foo} is the same as ${headers.foo}.

See this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top