XMS supports the point-to-point and publish/subscribe styles of messaging.
Styles of messaging are also called messaging domains.
If the underlying messaging and queuing system contains a message broker, the broker might replicate a message and route copies of the message to different queues so that more than one application can receive the message. The broker might also transform a message and add data to it.
A key characteristic of point-to-point messaging is that an application identifies a destination queue when it sends a message. The configuration of the underlying messaging and queuing system then determines precisely which queue the message is put on so that it can be retrieved by the receiving application.
A publisher supplies information in the form of 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 sending subscription requests to a publish/subscribe broker. The broker receives published messages from publishers and subscription requests from subscribers, and it routes published messages to subscribers. A subscriber receives messages on only those topics, to which it has subscribed.
A key characteristic of publish/subscribe messaging is that a publisher identifies a topic when it publishes a message, and a subscriber receives the message only if has subscribed to the topic. 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.