# Event-Driven Architecture

An architectural style in which components publish facts about state changes and independent consumers react through asynchronous channels.

- Type: framework
- Domain: Engineering & architecture
- Level: Advanced
- Last reviewed: 2026-09-22
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/event-driven-architecture/>)

## What it means

Event-driven architecture organizes collaboration around events: durable or transient records that something meaningful happened. Producers emit events without directing every downstream action; brokers, streams, or channels deliver them to interested consumers. This separates the timing and deployment of participants, though they remain coupled through event meaning, schemas, and delivery guarantees.

## Why it matters

A useful business event can trigger several independent reactions, such as fulfillment, notifications, analytics, and fraud checks after an order is accepted. Producers need not call each consumer or wait for all work to finish. This can improve responsiveness, independent scaling, extensibility, and resilience to temporary consumer failure when the infrastructure and processing model are designed carefully.

## When to use it

Use event-driven architecture for asynchronous workflows, fan-out, integrations, high-volume streams, or domains where recording and reacting to changes is natural. Prefer simpler synchronous calls when a user needs an immediate answer, the workflow is small, or the team cannot yet operate distributed messaging, observability, and recovery safely.

## How it works

1. Define business events as facts with clear names, ownership, meaning, and only the data consumers need.
2. Choose delivery infrastructure and guarantees appropriate to ordering, durability, latency, and throughput needs.
3. Publish events reliably with the state change, commonly using an outbox or equivalent atomic pattern.
4. Design consumers to handle retries, duplicates, delayed delivery, schema evolution, and poison messages.
5. Track correlation and causation so operators can understand workflows across asynchronous boundaries.
6. Monitor lag, failure destinations, processing outcomes, and business completion rather than broker health alone.

## A practical example

When a retailer accepts an order, it publishes an OrderAccepted event. Inventory reserves stock, fulfillment creates work, loyalty awards points, and analytics updates demand forecasts independently. A delayed loyalty consumer can catch up later without blocking checkout, while idempotency prevents duplicate points when an event is retried.

## Where it breaks

Asynchrony introduces eventual consistency, nondeterministic timing, duplicate delivery, harder tracing, and more complicated testing. Events can become disguised commands or expose unstable internal data. A broker does not remove coupling; unclear semantics and careless schema changes merely make that coupling harder to see and coordinate.

## Common mistakes

- Publishing vague technical events instead of stable facts that consumers can interpret consistently.
- Assuming exactly-once end-to-end processing and neglecting idempotency or deduplication.
- Updating business state and publishing its event in separate failure-prone operations.
- Building long invisible event chains without correlation, ownership, or recovery tooling.

## Visualization

[View the visualization on the website](<https://wiki.soroush.uk/topic/event-driven-architecture/#visualization-event-driven-architecture>)

## Sources

1. [What Is an Event-Driven Architecture?](<https://aws.amazon.com/event-driven-architecture/>) — Amazon Web Services · Institutional architecture overview
2. [Event-Driven Architecture Style](<https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/event-driven>) — Microsoft Learn · Institutional architecture guide
3. [Introduction to Event-Driven Architecture](<https://aws-samples.github.io/eda-on-aws/introduction/>) — AWS Samples · Technical practice guide

## Related topics

- [Microservices Architecture](<https://wiki.soroush.uk/topic/microservices-architecture/>)
- [Domain-Driven Design](<https://wiki.soroush.uk/topic/domain-driven-design/>)
- [Non-Functional Requirements](<https://wiki.soroush.uk/topic/non-functional-requirements/>)
