diagram.mmd — flowchart
Event Driven Architecture flowchart diagram

Event-driven architecture (EDA) is a software design paradigm in which services communicate exclusively by emitting and reacting to events, achieving loose coupling by ensuring that producers have no knowledge of which consumers exist or what they do with the events.

In a traditional request-response architecture, Service A calls Service B directly — it must know B's address, API contract, and availability. EDA inverts this relationship. Service A emits an event ("OrderPlaced") to a central event bus or broker, then continues executing. Service B, C, and D — each responsible for their own domain — subscribe to the events they care about and react independently. The producer never knows the consumers exist.

This decoupling delivers several architectural benefits. Services can be deployed, scaled, and failed independently. New consumers can be added without modifying producers. The event log serves as an audit trail of everything that happened in the system. And temporal decoupling means a slow consumer does not block a fast producer.

Events in EDA typically follow one of two structures: notification events (thin payloads that say "something happened, go look it up") or event-carried state transfer events (fat payloads containing the full state at the time of the event). Fat events reduce round-trips but increase payload size; thin events stay small but require consumers to query source-of-truth APIs.

EDA is the philosophical foundation for Event Streaming Architecture (which adds durability and replay), Event Sourcing Pattern (which stores events as the system of record), and the Saga Pattern (which uses events to coordinate distributed transactions). The Pub Sub Messaging model is its simplest concrete implementation.

Free online editor
Edit this diagram in Graphlet
Fork, modify, and export to SVG or PNG. No sign-up required.
Open in Graphlet →

Frequently asked questions

Event-driven architecture (EDA) is a design paradigm where services communicate exclusively by emitting and reacting to events through a central event bus or broker. Producers publish events describing things that have happened; consumers subscribe to the events they care about and react independently. Neither side needs to know the other exists.
A producer emits an event — such as "OrderPlaced" — to an event bus and continues executing without waiting. The broker forwards the event to all registered consumers. Each consumer processes the event asynchronously in its own context. New consumers can be added without any changes to producers, making the system open for extension without modification.
EDA is the right choice when you need loose coupling between microservices, independent deployability, or an audit trail of system activity. It suits domains with many downstream reactions to a single business event: an order placement triggering inventory deduction, email confirmation, fraud checking, and analytics updates simultaneously.
The most common mistake is using thin notification events that force every consumer to make a follow-up API call, re-coupling the system through the back door. Another pitfall is schema versioning: once events flow to multiple consumers, changing event structure without a migration strategy breaks consumers silently. Teams also underestimate the operational complexity of debugging asynchronous workflows compared to synchronous request-response calls.
mermaid
flowchart LR subgraph Producers OS[Order Service] PS[Payment Service] US[User Service] end EB[Event Bus\nMessage Broker] subgraph Consumers NS[Notification Service] IS[Inventory Service] AN[Analytics Service] AU[Audit Service] end OS -->|OrderPlaced event| EB OS -->|OrderCancelled event| EB PS -->|PaymentProcessed event| EB PS -->|PaymentFailed event| EB US -->|UserRegistered event| EB EB -->|OrderPlaced| IS EB -->|OrderPlaced| AN EB -->|OrderPlaced| AU EB -->|PaymentProcessed| NS EB -->|PaymentFailed| NS EB -->|UserRegistered| NS EB -->|all events| AU
Copied to clipboard