Publish Subscribe Messaging system

By | June 2, 2024

In the publish-subscribe messaging system, each message has multiple consumers. Topics are based on a publish subscribe messaging model where each message is broadcast to multiple subscribers who are listening to the topic.

Publish Subscribe Messaging
Fig 1- Topic: Publish Subscribe Messaging Model

Key feature of Publish Subscribe messaging model

  1. Publisher
    • The publisher is the entity that sends the message to the topic.
  2. Subscriber
    • These are the entities that receive messages from the topic.
  3. Topic
    • It is the destination that is used to broadcast the message to all the subscribers who subscribed to it.

When to use publisher subscribe messaging model

The publish-subscribe messaging model should be used when we want our message to be broadcast to multiple subscribers simultaneously. Example: Stock price updates to multiple trading applications in real-time.

Leave a Reply

Your email address will not be published. Required fields are marked *