Skip to content
BENIBIX Learn

Event Bus

Development🏗️ ArchitectureEvents and Messages

Also known as Message Bus, Event Broker, Event Stream

A shared line that takes events from senders to whoever wants them.

Think of it like

Think of it like a notice board in a school hall. Anyone can pin a note, and anyone can read it.

Example

In Emma's app, the cart puts an item added event on the bus. The badge counter and the suggestions panel both listen, and both update at once.

Why it matters

It gives a system one place for events to flow. Parts do not have to wire into each other.

Definition

An event bus is a shared channel that carries events to the parts that want them. Senders put events on the bus without knowing who will read them. Listeners tell the bus which kinds of event they care about. The bus passes each event to everyone who asked. It can live inside one app or run as a separate service between many.

Common mistake

Sending all things over the bus, even simple calls. Then finding a bug means guessing who did what.

Key takeaways

  1. 1
    One shared channel. For all events.
  2. 2
    Send without knowing. Who will read it.
  3. 3
    Listen by kind. Only what you need.