Index Changes
This is version 6. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
Fuji Home

Enterprise Integration Patterns - Message Filter

Overview

A Message Filter is a special form of a Content-Based Router. It examines the message content and passes the message to a service only if the message content matches certain criteria, otherwise the message is discarded.

Use Cases

Selective Processing


If a consumer wishes to receive only messages whose content satisfy a given criteria, a message filter can be inserted on the message path to filter out unwanted messages. The consumer can focus on processing the requests it expects and does not have the overhead of processing each incoming message and discarding those it is not interested in processing

Message Filtering


Messages with sensitive/private content can be hidden from services which should not be receiving them by inserting a message filter, on the path to these services, which filters out the sensitive messages.

IFL

Syntax

filter [type] [name | expression]
type := filter implementation (xpath, regex)
name := named configuration which contains the filter details
expression := inline filter configuration

Examples

Xpath filter with inline configuration

ftp "foo"
jruby "verify-address"

route do
    from "foo"
    filter xpath ("//orders/order")
    to "verify-address"
end

Xpath filter with external configuration

ftp "foo"
jruby "verify-address"

route do
    from "foo"
    filter xpath "ordersOnlyConfig"
    to "verify-address"
end
$ cat ordersOnlyConfig/flow.properties 
exp=//orders/order

In both the examples above only those messages which match the xpath expression will be allowed to continue.

Configuration

XPath

Regex

Packaging

Runtime

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 10-Mar-09 16:41 PM, -0700 by Nikita