WAS v8.5 > WebSphere applications > Web services > WS-Notification > WS-Notification: Overview

Brokered notification

The Web Services Brokered Notification specification defines how an intermediary - a NotificationBroker - is made responsible for disseminating messages produced by one or more Publishers to zero or more NotificationConsumers.

Section 4 of the WS-BrokeredNotification v1.3 OASIS Standard describes brokered notification as follows:

There are three distinct stages in the Notification process

Stages 1 and 2 happen largely outside of the scope of the WS-Notification architecture; this specification does not restrict the means by which these stages must occur. We refer to an entity that performs stages 1 and 2 as a Publisher.

However, the WS-Notification family of specifications does specify how dissemination of messages SHOULD occur. There are two dominant patterns by which Notifications are disseminated in WS-Notification: direct and brokered.

In the direct case, the publishing web service implements message exchanges associated with the NotificationProducer interface; it is responsible for accepting Subscribe messages and sending Notifications to interested parties. The implementer of this web service can choose to program this behavior or delegate to specialized implementations of the Subscribe and Notification delivery behavior. This case is addressed by the WS-BaseNotification v1.3 OASIS Standard.

In the brokered case, an intermediary - a NotificationBroker - is responsible for disseminating messages produced by one or more Publishers to zero or more NotificationConsumers.

There are three patterns associated with the relationship between the Publisher and the NotificationBroker: simple publishing, broker-initiated publishing and demand-based publishing.

The following figure illustrates simple publishing:

Figure 1. Simple publishing

In the simple publishing scenario, the Publisher entity is responsible only for the core Publisher functions - observing the Situation and formatting the Notification artifact that describes the Situation. The dissemination step occurs when the Publisher sends the Notify message to the NotificationBroker.

In the broker-initiated publishing pattern, the role of the Publisher is played by a web service that implements NotificationProducer. The act of observing the Situation and formatting the Notification happens within the implementation logic of the NotificationProducer itself. The Notification is disseminated by the NotificationProducer sending the Notify message to a NotificationBroker. The Notification might also be disseminated by sending the Notify message to any NotificationConsumers that are subscribing to the NotificationProducer.

in either of the previous two cases, the NotificationBroker might require the Publisher to register with it prior to sending the Notify message. For example, if the broker wants to control who can publish to a given Topic, it can run an access control check during this registration. However a NotificationBroker might allow Publishers to publish without pre-registration, if it so chooses.

The last pattern, the demand-based pattern, requires the Publisher to be a NotificationProducer, and thereby accept the Subscribe message. Demand-based publication is intended for use in cases where the act of observing the Situation or the act of formatting the Notification artifact might be expensive to perform, and therefore should be avoided if there are no interested parties for that Notification. A Publisher indicates its intention to use this pattern by registering with the NotificationProducer and setting the Demand component of the RegisterPublisher request message to "true". Based upon this style of registration, the NotificationBroker sends the Subscribe message to the Publisher (recall: in this situation the Publisher must implement the message exchanges associated with the NotificationProducer interface).

Figure 2. Demand-based publishing

The NotificationBroker is expected to pause its Subscription whenever it has no active Subscribers for the information provided by the Publisher. When the NotificationBroker does have active Subscribers, it is obliged to resume its Subscription to the Publisher.

Copyright © OASIS Open 2004-2006. All Rights Reserved.

This document and translations of it might be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation might be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided the previous copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself can 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.


Related concepts:

Base notification
WS-Topics
WS-Notification


Related


Example: Registering a WS-Notification publisher
Use WS-Notification for publish and subscribe messaging for web services
Secure WS-Notification


Reference:

WS-Notification troubleshooting tips

WS-BrokeredNotification v1.3 OASIS Standard


+

Search Tips   |   Advanced Search