Styles of messaging

XMS supports the point-to-point and publish/subscribe styles of messaging.

Styles of messaging are also called messaging domains.

Point-to-point messaging

A common form of point-to-point messaging uses queuing. In the simplest case, an application sends a message to another application by identifying, implicitly or explicitly, a destination queue. The underlying messaging and queuing system receives the message from the sending application and routes the message to its destination queue. The receiving application can then retrieve the message from the queue.

If the underlying messaging and queuing system contains IBM® Integration Bus, IBM Integration Bus might replicate a message and route copies of the message to different queues. As a result, more than one application can receive the message. IBM Integration Bus might also transform a message and add data to it.

A key characteristic of point-to-point messaging is that an application places a message onto a local queue when it sends a message. The underlying messaging and queuing system determines which destination queue the message is sent to. The receiving application retrieves the message from the destination queue.

Publish/subscribe messaging

In publish/subscribe messaging, there are two types of application: publisher and subscriber.

A publisher supplies information in the form of publication messages. When a publisher publishes a message, it specifies a topic, which identifies the subject of the information inside the message.

A subscriber is a consumer of the information that is published. A subscriber specifies the topics it is interested in by creating subscriptions.

The publish/subscribe system receives publications from publishers and subscriptions from subscribers. It routes publications to subscribers. A subscriber receives publications on only those topics to which it subscribed.

A key characteristic of publish/subscribe messaging is that a publisher identifies a topic when it publishes a message. It does not identify the subscribers. If a message is published on a topic for which there are no subscribers, no application receives the message.

An application can be both a publisher and a subscriber.