Rather than receiving all messages on a topic to which you have subscribed, your consuming application can use XML Path (XPath) selectors to filter the messages based upon the contents of each message. This content-based subscription gives greater flexibility in defining the type of information that you want to receive, your applications can use it to avoid responsibility for their own filtering, and it improves performance by not flowing messages unnecessarily from the server to the application.
The WS-Notification publish and subscribe messaging model is topic-based. Each publication is classified as belonging to one of a fixed set of topics. Publishers label each publication with a topic name and consumers subscribe to all publications on a particular topic. For example a stock trading notification system might define a topic for each issue: Publishers post information labeled with the appropriate issue as the topic name, and subscribers subscribe to information regarding some issue.
(issue="IBM") and (price<120) and (volume>1000)
You code your XPath 1.0 message content filters in the subscribing applications, by using XML Path (XPath) language, Version 1.0..
To filter the message content of publications by using XPath selectors, complete the following steps: