WS-Topics

The WS-Topics specification describes how a NotificationProducer application can associate a Topic with the NotificationMessages that it produces.

The abstract of the WS-Topics Version 1.3 OASIS Standard describes WS-Topics as follows:

This document defines a mechanism to organize and categorize items of interest for subscription known as "topics". These are used in conjunction with the notification mechanisms defined in WS-Base Notification. WS-Topics defines three topic expression dialects that can be used as subscription expressions in subscribe request messages and other parts of the WS-Notification system. It further specifies an XML model for describing metadata associated with topics.

Copyright © OASIS Open 2004. All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.

A Topic is used to group notification messages that relate to a particular type of information - for example a stock ticker NotificationProducer application might set the Topic of the NotificationMessages it produces to the stock symbol with which the information is associated - for example "stock/IBM".

NotificationConsumer applications are able to specify a Topic when they Subscribe, which results in delivery of all messages produced by that NotificationProducer application on the specified Topic.

Each Topic is defined as part of an XML namespace. The set of Topics associated with a given XML namespace is called a TopicNamespace. Allocation of Topics to a particular TopicNamespace is used to avoid naming collisions and facilitate interoperation between independently developed NotificationProducer application and NotificationConsumer applications.

Note: The WS-Topics TopicNamespace concept is slightly different to the service integration technologies concept of a Topic Space. For more information, see WS-Notification terminology.

The mechanism for achieving this collision avoidance is normally determined by the application developer - in one pattern an application developer defines a namespace for use by a related group of applications. This leaves the developer free to use whatever topic structure they see fit within that namespace. To continue the example above the application developer could define one TopicNamespace for notification messages published in French, and a different one for notifications published in English. A subscribing application then specifies the namespace/topic in which they are interested (eg "english:stock/IBM") to ensure they receive notification messages in the appropriate language. In this way you can use the ‘same' topic structure (with different namespaces) to ensure that the application does not receive incompatible notifications.

Section 6 of the WS-Topics specification describes the method for modeling TopicNamespaces as an XML document. This allows the structure of a Topic Space to be defined, and (optionally) places conditions on the Topics that can be used by applications referencing a given Topic Space. For information about how this has been implemented in WebSphere® Application Server, see Applying a WS-Notification topic namespace document.

Section 7 of the WS-Topics specification defines example topic expression dialects that are recommended for use by WS-Notification applications. Note that the WS-Notification specifications provide an extensibility mechanism to allow vendors to define their own topic expression dialects if they wish. The three topic expression dialects supported by WebSphere Application Server are as follows:

Simple TopicExpressions
A basic style of topic expression in which the only allowed topics are QNames. This means that only root topics are supported by the Simple TopicExpression dialect, and that there is no topic hierarchy or use of wildcards. Examples of valid Simple TopicExpressions are tns1:stock or tns2:sports, where (for example) tns1 is a reference to the namespace in which the topic is located.
Concrete TopicExpressions
This topic dialect extends the Simple TopicExpression pattern to allow topic hierarchies using the / (forward slash) character to indicate a ‘child of' relationship. Note that this topic dialect also does not allow wildcards. Examples of valid Concrete TopicExpressions are tns1:stock/IBM or tns2:sports/football. Note that a valid Simple TopicExpression is automatically valid in the Concrete TopicExpression dialect.
Full TopicExpressions
This topic dialect extends the Concrete TopicExpression dialect to include the concepts of wildcards and conjunction. It is based on a subset of the XPath location path expressions, and describes how expressions of this type can be evaluated using the XML document representation of a Topic Space as previously described. Use the XPath-style asterisk (*) and dot (.) characters as wildcards, and the vertical bar (|) character as the conjunction operator. Examples of valid Full TopicExpressions are as follows:
tns1:t1/*
tns1:t1/*/t3
tns1:*
tns1:t1/t3//.
tns1:t1/t3//*
tns1://*
tns1:t1//t3
tns1:t1/t2 | tns1:t4/t5

In general NotificationProducer applications may support any number of the topic dialects described above (including none, and also support dialects not listed above). This allows simple NotificationProducer applications to specify how they want to expose the structure of the information on which they provide notifications.

The NotificationBroker provided by WebSphere Application Server supports all three of the dialects previously described, and the application developer can decide which one to use depending upon their requirements. For complicated expressions that use wildcards the application needs to use the Full TopicExpression dialect, whereas for simpler cases the application can use the Simple or Concrete TopicExpression dialects.




Related concepts
Base notification
Brokered notification
Learning about WS-Notification
WS-Notification - overview
Related tasks
WS-Notification - publish and subscribe messaging for Web services
Securing WS-Notification
Related reference
http://docs.oasis-open.org/wsn/wsn-ws_topics-1.3-spec-os.pdf
WS-Notification troubleshooting tips
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 2:56:59 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=cjwsn_topics
File name: cjwsn_topics.html