WebSphere Message Brokers
File: aq01210_
Writer: Terry Cowling

Concept topic

This build: July 31, 2007 21:35:13

Filters

A filter is an expression, which might include wildcard characters, that is applied to the content of a publication message to determine whether it matches a subscription.

When you register a subscription, in addition to specifying a topic and subscription point, you can specify a filter to select publications according to their contents. WebSphere Message Broker needs to know how to parse the contents of the message correctly. This can be achieved in a number of ways:
The filter itself is entered as an SQL-like expression; for example:
     Body.Name LIKE 'Smit%'

This means that the contents of a field called Name in the body of a publication message are extracted and compared with the string given in the expression. If the string in the message starts with the characters "Smit", the expression evaluates to TRUE and the publication is sent to the subscriber.

If you want to select publications using filters only, without specifying a topic, you can register a subscription with the required filter and a topic of "#" (all topics). You then receive publications on only those topics for which you have access authority.

This subscription results in all publications from all connected brokers being sent to the broker that is local to the subscriber. Therefore, for performance reasons, if you have set up a network of brokers, you are advised to not use this technique.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:35:13

aq01210_ This topic's URL is: