Publish and Subscribe (Pub/Sub) Messaging Pattern
With the pub/sub messaging pattern, the receivers of messages have subscribed to a distribution object. A sender posts messages to this published distribution object, rather than individually addressing message recipients. Usually recipients can subscribe and unsubscribe as needed.
By decoupling publishers and subscribers, a simple, dynamic, asynchronous messaging system can be implemented to enable data exchange among distributed programs. Pub/sub is often a component of message-oriented middleware systems. These systems typically add a variety of message reliability features, along with the ability to specify which programs can send messages through the distribution object, and which programs can subscribe to it.











