Publish-Subscribe Pattern

In the publish-subscribe pattern, producers and consumers exist independently and unaware of one another. Numerous consumers subscribe to events published by various producers. Producers and consumers communicate indirectly via an event bus, which is responsible for connecting published events with interested subscribers. The choice of event bus technology greatly influences the systems properties. Choose the publish-subscribe pattern when multiple, independent components need access to the same information. See the table.

Category

Component & Connector

Elements

Publisher—any component that publishes an event. Specific events published should be described in design documentation.

Subscriber—any component that subscribes ...

Get Design It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.