Lotus Expeditor Toolkit, Version 6.2
Operating systems: Linux on x86, Windows


Publish and subscribe messaging

Publish and subscribe is a style of messaging in which applications (subscribers) register interest in a particular subject (known as a topic) with an intermediary (a broker). The broker then compares those subscription topics to the topics of messages sent by other applications (publishers) and forwards messages to those subscribers where a match is made.

Each message has a header and a body. The body contains the message content. The header, which is similar to the subject field of an e-mail, describes the content of the message, and includes the message topic.

A single message sent by a publisher may be matched and sent to many subscribers. This messaging style is of particular benefit when multiple components in a system need to receive notification of a given event. For example, a temperature sensor may have many different systems monitoring it for different reasons. The broker decouples the publisher from the subscribers and gives flexibility for the adding or removal of publishers or subscribers without needing to perform application specific integration between each component.

A typical situation would be as follows:
  • Each subscriber individually subscribes with the broker to receive messages published to the “Temperature” topic.
  • A publication is sent from the publisher to the broker with “Temperature” as its topic.
  • The broker checks its internal record of subscriptions and sends the message to each subscriber that has registered to receive messages with the topic “Temperature”.
The following figure shows a simple publish and subscribe application that includes one publisher, one broker, and three subscribers.
Figure 1. A simple publish and subscribe applicationThe following figure shows the simplest publish/subscribe application.

A publish and subscribe application may have more than one publisher, more than one subscriber, and even more than one broker. If necessary, an application can be both a publisher and a subscriber to one or more brokers.



Library | Support | Home | Education | Terms of use |

Last updated: October 21, 2008
© Copyright IBM Corporation 2006, 2008. All Rights Reserved.
This information center is built on Eclipse™ (http://www.eclipse.org)