/
Filter Processor
Filter Processor
The Filter processor can be used to prevent uninteresting or unwanted messages from reaching the producer endpoint. It will accept a single predicate argument: if the predicate absolves to true, then the message exchange is allowed through to the producer; however if the predicate is false, the message exchange is blocked.
XML DSL:
<camelContext id="filterRoute" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="SourceURL"/>
<filter>
<simple>header.foo = 'bar'</simple>
<to uri="TargetURL"/>
</filter>
</route>
</camelContext>
Java DSL:
from("SourceURL").filter(header("foo").isEqualTo("bar")).to("TargetURL");
, multiple selections available,
Related content
Choice Processor
Choice Processor
More like this
Guide to XML DSL (Message Filter)
Guide to XML DSL (Message Filter)
More like this
Throttle Processor
Throttle Processor
More like this