Publishersubscriber
Publishersubscriber, commonly written as publish-subscribe or pub/sub, denotes a messaging pattern in which information producers (publishers) emit messages that are categorized by topics or channels, and consumers (subscribers) receive messages based on their interest. Publishers and subscribers are decoupled: publishers do not need to know who subscribes, and subscribers do not need to know who publishes. This decoupling enables scalable, asynchronous distribution of events across distributed systems.
Most implementations rely on a mediator, often a message broker, that routes messages from publishers to subscribers.
Key characteristics include loose coupling, scalability through horizontal expansion, and asynchronous delivery. Delivery semantics vary: at-most-once,
Common examples include MQTT for IoT, Apache Kafka for event streaming, Google Cloud Pub/Sub, and Redis Streams.