0% found this document useful (0 votes)
5 views1 page

Message Filter Pattern for Data Routing

The Message Filter pattern allows for the removal of unwanted data from a channel by evaluating incoming messages against specified criteria, routing only those that meet the criteria to a single receiver. It is a specific type of the Message Router pattern, focusing on a single receiver channel, and discarding messages that do not meet the defined routing condition. The implementation involves using a Content Modifier to store the product category value, which is accessed via an XPath expression.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Message Filter Pattern for Data Routing

The Message Filter pattern allows for the removal of unwanted data from a channel by evaluating incoming messages against specified criteria, routing only those that meet the criteria to a single receiver. It is a specific type of the Message Router pattern, focusing on a single receiver channel, and discarding messages that do not meet the defined routing condition. The implementation involves using a Content Modifier to store the product category value, which is accessed via an XPath expression.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Message Filter

You can use the Message Filter pattern to remove any data from a channel that you aren't
interested in.

Let's assume that you want to send product information to an inventory system, but the
inventory system only handles a subset of the range of products, depending on the product
category. You can use the Message Filter pattern to remove any data from a channel that you
aren't interested in. The Message Filter is a specific type of the Message Router pattern that has
only one single receiver channel. Any incoming message is evaluated, and if it meets the criteria
specified by the Message Filter, the message is routed to the receiver, otherwise it's discarded.

Implementation

The Message Filter pattern is similar to the Content-Based Routing pattern where the message
is ignored if the receiver can't be determined. See the reference integration flow Pattern
Content Based Routing - Ignore If No Receiver (described in Variant: Ignore).

For the Message Filter pattern however, you define only one single receiver.

In the Pattern Message Filter integration flow, a routing condition is defined that is based on
the product category. The message is discarded if the routing condition isn't met. This behavior
is achieved by adding a default routing pointing to an end event.

A Content Modifier stores the XPath expression value in an exchange property (with the
name productCategory) accessing the desired value with the following XPath
expression: /ns0:Product/Category.

You might also like