THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<from uri="seda:orders">
<filter>
<simple>in.header.foo</simple>
<to uri="mock:fooOrders"/>
</filter>
</from>
{code:xml}
The Simple language can be used for the predicate test above in the filter, where we test if the in message has a {{foo}} header (a header with the key {{foo}} exists). If the expression evaluates to *true* then the message is routed to the {{mock:foo}} endpoint. And for *false* it is of course routed to {{mock:bar}} endpoint.
The same example in Java DSL:
{code:java} |
The Simple language can be used for the predicate test above in the Message Filter pattern, where we test if the in message has a foo
header (a header with the key foo
exists). If the expression evaluates to true then the message is routed to the mock:foo
endpoint, otherwise its lost in the deep blue sea .
The same example in Java DSL:
Code Block | ||||
---|---|---|---|---|
| ||||
from("seda:orders") .filter().simple("in.header.foo").to("seda:fooOrders"); |
...