Search

Chapter 1. Introduction to WS-Notification

download PDF

1.1. WS-Notification Standard

Overview

WS-Notification is a standard that describes a publish/subscribe messaging model implemented over Web services. The functionality is quite similar to the JMS publish/subscribe model, but the interfaces and the protocols are defined in terms of Web services standards (based on Apache CXF, in the context of JBoss A-MQ).
The WS-Notification standard is defined by combining the following OASIS specifications:
  • WS-Topics
  • WS-BaseNotification
  • WS-BrokeredNotification

WS-Topics

The WS-Topics standard describes how to organize and define the topics used in a notification broker. In particular, the following aspects of a topic are described:
  • Topic hierarchy—a hierarchical naming scheme, which can be defined using an XML document associated with the notification broker.
  • Topic set—a standardized XML schema, which can optionally be used to define the hierarchy of topic names.
  • Topic dialect—a particular type of name expression that is used to specify one topic or to select multiple topics. The following dialects are defined by the WS-Topics specification:
    • Simple
    • Concrete
    • Full
    • XPath
Note
Topic hierarchies are not supported in JBoss A-MQ. Only Simple topic names can be defined.

WS-BaseNotification

The WS-BaseNotification standard describes a simple point-to-point model of message notification. The base standard can be useful, if you want to send notifications through a standardized interface, without deploying a fully-fledged broker to mediate the messages. The following WSDL interfaces are defined in this standard:
NotificationPublisher
Must be implemented by the entity that wants to publish messages. This interfaces exposes the subscribe operation, which enables consumers to register their interest in receiving notifications from this publisher.
NotificationConsumer
Must be implemented by the entity that wants to receive messages. This interface exposes the notify operation, which enables the consumer to receive message notifications directly from the publisher.
In addition to the two preceding interfaces for point-to-point communication, WS-BaseNotification defines another pair of interfaces for supporting pull-style notification, as follows:
CreatePullPoint
Exposes the createPullPoint operation, which creates a PullPoint object that can be used to accumulates messages.
PullPoint
Exposes the notify operation, which enables the pull-point to accumulate notification messages, and the getMessages operation, which enables a pull-style consumer to retrieve the accumulated messages when it is ready.

WS-BrokeredNotification

The WS-BrokeredNotification standard describes a brokered model of message notification, where a central broker (or network of brokers) can be used to route messages between publishers and consumers. This architecture scales much better than point-to-point, because each consumer requires only a single connection to the broker in order to monitor notifications from all publishers. The following additional interfaces are defined in this specification:
NotificationBroker
Combines the NotificationPubisher, NotificationConsumer, and CreatePullPoint interfaces, enabling you to provide the full range of notification services in a single application.
The NotificationBroker interface defines one additional operation, the registerPublisher operation, which can optionally be used to register publishers with the broker. In particular, this operation can be useful when constructing a federation of brokers.
RegisterPublisher
The notification broker also implements the RegisterPublisher interface, which defines one additional operation, registerPublisher. A publisher can optionally use the registerPublisher operation its NotificationPublisher object with the broker.
Note
It is also possible for publishers to send messages to the broker straightaway, by invoking notify, without needing to register in advance.
PublisherRegistrationManager
The return value of the registerPublisher operation is a reference to a PublisherRegistrationManager object, which can be used to destroy a registration.

References

For more information about the WS-Notification standards, see the following references:
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.