此内容没有您所选择的语言版本。

Chapter 1. Introduction to WS-Notification


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

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.