Publish/subscribe is a style of messaging application in which the providers of information (publishers) are decoupled from the consumers of that information (subscribers) using a broker.
In a publish/subscribe system, a publisher does not need to know who uses the information (publication) that it provides, and a subscriber does not need to know who provides the information that it receives as the result of a subscription.
Compare this with a point-to-point style of messaging application, in which the application that sends messages needs to know the destinations of the messages that it sends.
Message brokers make sure that messages arrive at the correct destinations, and are transformed to the format required at each destination.
The following figure shows the simplest publish/subscribe application. There is one publisher, one broker, and one subscriber. A publication is sent from the publisher to the broker, a subscription is sent from the subscriber to the broker, and the publication is then sent from the broker to the subscriber.
However, a typical publish/subscribe system has more than one publisher and more than one subscriber, and often more than one broker. An application can be both a publisher and a subscriber.
The publisher generates a message that it wants to publish and defines the topic of the message. A message flow running in the broker retrieves the message from its input node and passes the message to a Publication node for distribution to all subscribers that have registered an interest in the topic.
The input node might be one of the following built-in nodes:
A subscriber registers a request for a publication by specifying one of the following items:
Refer to Quick Tour for an illustration of how a publish/subscribe system works.