Overview

Publish-Subscribe (Pub/Sub) is a messaging pattern where publishers categorize messages into topics without knowledge of which subscribers, if any, there may be. Similarly, subscribers express interest in one or more topics and only receive messages that are of interest.

Key Features

  • Decoupling: Publishers and subscribers are unaware of each other.
  • One-to-Many: A single message can be received by multiple subscribers.
  • Real-time: Messages are typically delivered immediately to active subscribers.

Use Cases

  • Real-time notifications.
  • Distributed logging.
  • Data streaming.

Related Terms