Pub/Sub

Noun · Development

Definitions

  1. Pub/Sub (Publish/Subscribe) is a messaging pattern where senders (publishers) emit events to named topics without knowing who receives them, and receivers (subscribers) listen to topics without knowing who sends. This full decoupling allows each side to scale, deploy, and evolve independently. When a publisher emits a message, the system delivers a copy to every active subscriber on that topic. Pub/Sub is foundational to event-driven architectures, enabling real-time notifications, data pipelines, and fan-out processing. Implementations include Apache Kafka, Google Cloud Pub/Sub, AWS SNS, Redis Pub/Sub, and browser CustomEvents. Unlike point-to-point message queues where each message goes to one consumer, Pub/Sub broadcasts to all subscribers.

    In plain English: A messaging system where senders broadcast events and receivers subscribe to the ones they care about, without knowing about each other.

    Example: "When an order is placed, the order service publishes to the 'order.created' topic — the email, inventory, and analytics services each subscribe independently."

Related Terms