Event Bus
Also known as: Message Bus, Pub/Sub System, Event Stream
A messaging infrastructure that lets services publish events and subscribers consume them — decoupling producers from consumers.
Definition
An event bus is a messaging infrastructure pattern where services publish events (a thing happened) and any number of subscribers can consume those events independently. The bus sits between producers and consumers, broadcasting events without requiring either side to know about the other directly.
The defining benefit is decoupling: a service that publishes 'user.signed_up' doesn't need to know which services react to it. Marketing automation might enroll the user in onboarding emails. Analytics might log the signup. Billing might create a customer record. The publisher fires once; all consumers react independently.
Common event bus implementations include Apache Kafka, AWS EventBridge, Google Cloud Pub/Sub, Redpanda, NATS, and RabbitMQ. The choice depends on throughput needs, durability requirements, ordering guarantees, and operational complexity.
Why It Matters
Event buses are what make modular, scalable systems possible. Without one, every new consumer of an event requires modifying the producer — leading to tightly-coupled spaghetti integrations. With one, adding a new consumer is purely additive: the new service subscribes to the existing event stream without touching the producer.
The biggest mistake is treating event buses as 'just message queues.' Queues are point-to-point (one producer, one consumer per message). Event buses are publish/subscribe (one producer, many consumers per event). Using the wrong pattern leads to architectural mismatches that compound over time.
Examples in Practice
A SaaS company's AWS EventBridge bus carries events like 'user.created', 'subscription.upgraded', 'invoice.paid'. Multiple downstream services subscribe: marketing automation (for welcome flows), CRM sync (for record updates), analytics (for funnel tracking), notifications (for in-app alerts). Each subscribes independently; the producer publishes once.
An e-commerce platform uses Kafka to handle order events. A single 'order.placed' event is consumed by inventory (decrement stock), fulfillment (initiate shipping), accounting (record revenue), email (send confirmation), and recommendations (update buyer profile). Adding a new consumer doesn't require touching the order service.
A B2B SaaS company replaces a tangle of direct service-to-service API calls with an event bus. Before: 12 services made 47 direct API calls to each other. After: 12 services publish/subscribe via the event bus with 60% fewer dependencies and dramatically simpler architecture.