Filter component
The Filter component only allows messages to pass through if the configured expression evaluates to true. All other messages are discarded.
Configuration
The Filter component has the following configuration options:
Property | Description |
---|---|
Expression | The expression that is evaluated for each message. Only messages for which the expression holds are allowed through the filter. |
Type | The language of the expression. Expressions can be defined using the Simple Expression Language or XPath 2.0. |
Examples
Expression | Type | Description |
---|---|---|
//book | XPath 2.0 | Only allow XML documents containing elements named 'book' to pass. |
/bookstore/book[price>20] | XPath 2.0 | Only allow XML documents to pass if the their root element is named 'bookstore', and this element contains a child element named 'book' that has an attribute price with a value larger than 20. |
${bodyAs(String)} contains 'text' | Simple | Only allow documents to pass through if their body contains the string 'text'. |