Contact Us 1-800-596-4880

Filters Configuration Reference

For more information on filters, see Using Filters.

Filter

A filter that is defined elsewhere (at the global level, or as a Spring bean).

Attributes of <filter…​>

Name Type Required Default Description

ref

string

yes

The name of the filter to use.

No Child Elements of <filter…​>

Not filter

Inverts the enclosed filter. For example, if the filter would normally return true for a specific message, it will now return false, and vice versa.

Attributes of <not-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

Child Elements of <not-filter…​>

Name Cardinality Description

abstract-filter

0..1

A placeholder for filter elements, which control which messages are handled.

And filter

Returns true only if all the enclosed filters return true.

Attributes of <and-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

Child Elements of <and-filter…​>

Name Cardinality Description

abstract-filter

2..*

A placeholder for filter elements, which control which messages are handled.

Or filter

Returns true if any of the enclosed filters returns true.

Attributes of <or-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

Child Elements of <or-filter…​>

Name Cardinality Description

abstract-filter

2..*

A placeholder for filter elements, which control which messages are handled.

Wildcard filter

A filter that matches string messages against wildcards. It performs matches with "*", for example, "jms.events.*" would catch "jms.events.customer" and "jms.events.receipts". This filter accepts a comma-separated list of patterns, so more than one filter pattern can be matched for a given argument: "jms.events.*, jms.actions.*" matches "jms.events.system" and "jms.actions" but not "jms.queue".

Attributes of <wildcard-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

pattern

string

yes

The property name and optionally a value to use when matching. If the expression is just a property name, the filter will check that the property exists. Users can also use '=' and '!=' to determine a specific value for a property.

caseSensitive

boolean

no

true

If false, the comparison ignores case.

No Child Elements of <wildcard-filter…​>

Expression filter

A filter that can evaluate a range of expressions. It supports some base expression types such as header, payload (payload type), regex, and wildcard.

Attributes of <expression-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

evaluator

expressionFilterEvaluators

no

The expression evaluator to use. The expression filter supports some types such as header, payload, exception, wildcard, and regex, that are built-in filters not registered with the ExpressionEvaluatorManager. All others are registered with the ExpressionEvaluatorManager. Where XPath, bean, and ONGL are used, the expression should be a boolean expression.

expression

string

yes

The expression that will be evaluated. This should always be a boolean expression. The syntax of the expression will be determined by the expression language being used.

customEvaluator

name (no spaces)

no

Must be set if the evaluator is set to custom. The custom evaluator must be registered with the ExpressionEvaluatorManager if it is to be used here.

nullReturnsTrue

boolean

no

Whether the filter should return true if the specified expression returns null.

No Child Elements of <expression-filter…​>

Regex filter

A filter that matches string messages against a regular expression. The Java regular expression engine (java.util.regex.Pattern) is used.

Attributes of <regex-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

pattern

string

yes

The property name and optionally a value to use when matching. If the expression is just a property name, the filter will check that the property exists. Users can also use '=' and '!=' to determine a specific value for a property.

flags

string

no

Comma-separated list of flags for compiling the pattern. Valid values are CASE_INSENSITIVE, MULTILINE, DOTALL, UNICODE_CASE and CANON_EQ.

NO Child Elements of <regex-filter…​>

Message property filter

A filter that matches properties on a message. This can be very useful, as the message properties represent all the meta information about the message from the underlying transport, so for a message received over HTTP, you can check for HTTP headers and so forth. The pattern should be expressed as a key/value pair, such as "propertyName=value". If you want to compare more than one property, you can use the logic filters for And, Or, and Not expressions. By default, the comparison is case sensitive, which you can override with the 'caseSensitive' property.

Attributes of <message-property-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

pattern

string

yes

The property name and optionally a value to use when matching. If the expression is just a property name, the filter will check that the property exists. Users can also use '=' and '!=' to determine a specific value for a property.

caseSensitive

boolean

no

true

If false, the comparison ignores case.

scope

enumeration

no

outbound

Property scope to lookup the value from (default: outbound)

No Child Elements of <message-property-filter…​>

Exception type filter

A filter that matches the type of an exception.

Attributes of <exception-type-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

expectedType

class name

yes

The expected class used in the comparison.

No Child Elements of <exception-type-filter…​>

Payload type filter

A filter that matches the type of the payload.

Attributes of <payload-type-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

expectedType

class name

yes

The expected class used in the comparison.

No Child Elements of <payload-type-filter…​>

Custom filter

A user-implemented filter.

Attributes of <custom-filter…​>

Name Type Required Default Description

name

name (no spaces)

no

Identifies the filter so that other elements can reference it. Required if the filter is defined at the global level.

class

class name

no

An implementation of the Filter interface.

Child Elements of <custom-filter…​>

Name Cardinality Description

spring:property

0..*

Spring-style property element for custom configuration.

Encryption security filter

A filter that provides password-based encyption.

Attributes of <encryption-security-filter…​>

Name Type Required Default Description

strategy-ref

string

no

The name of the encryption strategy to use. This should be configured using the ' password-encryption-strategy ' element, inside a ' security-manager ' element at the top level.

No Child Elements of <encryption-security-filter…​>