...

/

Publish and Subscribe

Publish and Subscribe

Learn about publish-subscribe architecture and its pros and cons.

Overview

Publish and subscribe is an architecture where certain clients publish the information and certain clients receive that information. There are mainly three components present in this architecture:

  • Publishers
  • Subscribers
  • Event bus

Each of these components performs certain jobs regardless of interacting with each other. A publisher publishes the information without having details about the users who will be using the published data. Similarly, a subscriber can get the information regardless of knowing who posted this information. The event bus is responsible for smoothly transferring messages or information from publishers to subscribers.

Press + to interact
The structure of publish and subscribe architecture
The structure of publish and subscribe architecture

Any subscriber can get the whole information that a single publisher posts, but this might not be the case. The subscribers can subscribe to the information that’s relevant to them. The event bus will filter the ...