Fundamentals
What is Event Driven Architecture?
Event Driven Architecture (EDA) is a software design paradigm in which the flow of a system is determined by events — significant state changes, updates, or actions that are produced, detected, consumed, and reacted to by loosely coupled components. Unlike traditional request-response architectures where services directly call each other, EDA enables asynchronous, real-time communication where producers emit events without knowing which consumers will process them.
This decoupling is what makes EDA particularly powerful for building scalable, resilient distributed systems. Services can be added, removed, or scaled independently without impacting the rest of the system. Events flow through a middleware layer (event bus, message broker, or event mesh) that handles routing, transformation, and delivery guarantees.
-
◈
Loose Coupling — Producers and consumers are fully decoupled; neither knows about the other's existence, enabling independent deployment and scaling of services.
-
◈
Asynchronous Processing — Events are processed asynchronously, freeing producers from waiting for consumer responses and enabling higher throughput and responsiveness.
-
◈
Real-Time Reactivity — Systems react to events as they occur, enabling real-time dashboards, instant notifications, and immediate business responses.
-
◈
Auditability — Every state change is captured as an immutable event, providing a complete audit trail and enabling event replay for debugging or recovery.
Core EDA Topology Patterns
At its core, EDA is built on two fundamental topologies that define how events flow through a system. Understanding these topologies is essential before diving into more advanced patterns.
-
◈
Mediator Topology — A central event mediator (or event bus) coordinates event flow. Events are routed through a mediator that applies rules, content-based routing, and process orchestration. Best suited for complex business processes where events need to be coordinated across multiple steps.
-
◈
Broker Topology — A decentralized chain of event brokers (like Kafka, RabbitMQ, or Solace) distributes events without a central mediator. Each broker processes and forwards events based on subscription matching. This topology is simpler, more scalable, and ideal for high-throughput streaming pipelines.
-
◈
Event Sourcing — Instead of storing current state, the system stores a complete log of events that led to the current state. The current state is derived by replaying events. This provides a full audit trail and enables temporal queries.
-
◈
CQRS — Command Query Responsibility Segregation separates the write model (commands that mutate state) from the read model (queries that return data). Each model can be optimized independently for its specific workload.