Information Technology Reference
In-Depth Information
subscribe to it. Messages containing new information are placed in a queue
for each subscriber by the publishing application. Each application in this
scheme may have a dual role: it may act as a publisher or subscriber of
different types of information. The subscription list can be easily modi-
fied, on the fly, providing a highly flexible communications system that
can run on different systems and networks. The publish/subscribe mes-
saging mode usually includes the ability to transform messages, acting as
an interpreter, which enables applications that were not designed to work
together to do so.
The message server takes the responsibility of delivering the published
messages to the subscribing applications based on the subscribed topic. Every
message has an expiration time that specifies the maximum amount of time
that it can live from the time of its publication in a topic. The message server
first delivers messages to its associated active subscribers and then checks to
make sure if there are any nonactive durable subscribers subscribed to the
published topic. If, after the initial delivery, any of the durable subscribers
did not acknowledge receipt of the message, the message is retained in the
message server for the period of the expiration time, in the hope that the
durable subscribers, if any, will connect to the message server and accept
delivery of the message.
All subscribers have a message event listener that takes delivery of the
message from the topic and delivers it to the messaging client application for
further processing. Subscribers can also filter the messages that they receive
by qualifying their subscriptions with a message selector. Message selectors
evaluate a message's headers and properties (not their bodies) with the pro-
vided filter expression strings.
5.3.3 Point-to-Point Messaging
Point-to-point model is a pull-based or polling-based model, where messages
are requested from a queue instead of being pushed to the client automati-
cally as is the case with publish/subscribe model. Many large systems are
divided into several separate units; the point-to-point messaging model pro-
vides reliable communication for such multistaged applications. The point-
to-point messaging model allows clients to send and receive messages both
synchronously and asynchronously via queues. One important difference
between the publish/subscribe messaging and the point-to-point messaging
is that point-to-point messages are always delivered, regardless of the cur-
rent connection status of a receiver.
5.3.4 Event-Driven Processing Mechanism
The asynchrony, heterogeneity, and inherent loose coupling that character-
ize modern applications in a wide area network promote event interaction
as a natural design abstraction for a growing class of software systems.
Search WWH ::




Custom Search