This pattern is a more general form of the endpoint callback pattern. Here, a broker acts as an intermediary between the actual sender and recipients. Yes, multiple recipients can subscribe to a topic i.e. a named logical group of channels published by anyone.
In this case, the process of communication is as follows:
- One or more listeners will inform a broker process that they are interested in subscribing to a topic
- A publisher will post a message to the broker under the relevant topic
- The broker dispatches the message to all the subscribers
A broker has the advantage of fully decoupling the sender and receiver in many senses. Additionally, the broker can perform many additional tasks, such as message enrichment, ...