WS-Notification enables web services to use the publish and subscribe messaging pattern.
You use publish and subscribe messaging to publish one message to many subscribers. In this pattern a producing application inserts (publishes) a message (event notification) into the messaging system having marked it with a topic that indicates the subject area of the message. Consuming applications that have subscribed to the topic in question, and have appropriate authority, all receive an independent copy of the message that was published by the producing application. Any consuming application can further filter messages for a given topic, by using a message content filter that is evaluated over the XML message content of the message body.
The WS-Notification implementation in WebSphere® Application Server supports the WS-Notification standards, complies with the WS-I Basic Profile 1.0 requirements, and composes with other related standards such as WS-Addressing for High Availability and Workload Management, and WS-ReliableMessaging for reliable communication between components. At an application level, this enables a standardized approach for web service applications to participate in the publish and subscribe messaging pattern, whether this be listening for notification of a particular event occurrence, or inserting event notifications into the system for consumption by other applications or system management tooling. The open-standards nature of this web services specification mean that applications can communicate with each other irrespective of the underlying hardware platforms, software languages or vendor environments.
WebSphere Application Server implements the WS-Notification Version 1.3 family of standards that are developed under the supervision of the Organization for the Advancement of Structured Information Standards (OASIS). These standards define web service message exchanges that enable web service applications to use the publish and subscribe messaging pattern.
See also WS-Notification terminology.
The key component of this implementation is the notification broker. This is a point of separation between producing applications that want to insert event notifications into the system, and consuming applications that want to receive the event notifications. WebSphere Application Server provides this broker ready for use, so that applications can concentrate on the business level functional requirements of sending and receiving events without needing to implement the more complex infrastructure aspects of the WS-Notification specifications, such as maintaining lists of active subscribers; parsing and matching topics and wildcards; distributing event notifications to subscribers; handling subscription lifecycles. This separation between producing and consuming business application means that the producer and consumer applications do not have to be available at exactly the same time in order for them to communicate. The broker retains a publication until the consumer becomes available.
The following figure shows an application server that contains a notification broker and a messaging engine. Within the messaging engine there is a durable subscription and a bus topic space. Between the application server and the outside world there is a Web service endpoint. In the outside world there is a publisher, a subscriber and a notification consumer. The publisher sends a notification message on a given topic, and the subscriber sends a subscribe request on behalf of the notification consumer to subscribe to the same topic. Both these messages are received by the web service endpoint, then routed into the associated broker and on to the topic space. Details of the subscription are filed as a durable subscription. The received notification message is forwarded by the broker to the notification consumer that has subscribed to the topic.
The Web Services Base Notification specification defines WSDL port types for applications that want to act as a NotificationProducer or a NotificationConsumer. A NotificationProducer is an application that inserts event notifications into the system, whereas a NotificationConsumer application receives event notifications that have been published by a different application (usually a NotificationProducer application).
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.
The WS-Topics standard describes how a NotificationProducer application can associate a Topic with the NotificationMessages that it produces.