Publish-Subscribe Pattern
A messaging pattern where publishers send messages to topics consumed by subscribers.
Also: pub/sub
Definition
The publish-subscribe (pub/sub) pattern is an asynchronous messaging paradigm where publishers emit messages to named channels (topics) without knowledge of who will receive them, and subscribers receive messages from topics they have registered interest in, without knowing publishers. This decoupling enables highly scalable event-driven architectures. Apache Kafka, Google Cloud Pub/Sub, AWS SNS/SQS, and Redis Pub/Sub implement this pattern. It supports fan-out delivery, replay, and event sourcing.
Example
“An e-commerce platform uses pub/sub so that when an order is placed (published to the order-created topic), the inventory service, email service, and analytics service each receive and process the event independently.”
Synonyms
- publish-subscribe
- topic-based messaging
- event broadcast
Antonyms / Opposites
- point-to-point messaging
- synchronous call
Images
CC-licensed · free to useVideo
Related Terms
- message-queue
- event-driven
- microservices
- kafka
