Event-driven architecture
Services publish facts such as “order placed” and others react to them, instead of services calling each other directly.
Three styles hide under one name. Event notification sends a thin event and consumers call back for details. Event-carried state transfer puts the data in the event, so consumers keep their own copy and never call back. Event sourcing stores the events as the source of truth. Adding a new consumer needs no change to the producer; the costs are flows that are hard to trace end to end and data that is only eventually consistent.
Related terms
- Event sourcing: Storing every change as an event in an append-only log and rebuilding current state by replaying it, instead of storing only the latest state.
- At-least-once delivery: A queue or broker guarantee that every message arrives, possibly more than once, so consumers must handle duplicates.
- Eventual consistency: A guarantee that copies of data will agree once updates stop arriving, but may briefly show different values in the meantime.
- Transactional outbox: Saving an event to an outbox table in the same database transaction as the change itself, then publishing it to the broker separately.
