Skip to main content
Version: 4.14.4

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:

PropertyDescription
ExpressionThe expression that is evaluated for each message. Only messages for which the expression holds are allowed through the filter.
TypeThe language of the expression. Expressions can be defined using the: Simple Expression Language, which also supports File Expression Language, XPath 2.0 or JsonPath.

Examples

ExpressionTypeDescription
//bookXPath 2.0Only allow XML documents containing elements named 'book' to pass.
/bookstore/book[price>20]XPath 2.0Only 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'SimpleOnly allow documents to pass through if their body contains the string 'text'.