# Event Sourcing

> Use an append-only store to record a full series of events describing actions on data

- **Category**: Cloud
- **Subcategory**: azure
- **Canonical URL**: https://designpattern.fyi/patterns/azure_event_sourcing/

---

## Description
The Event Sourcing pattern uses an append-only store to record a full series of events that describe actions taken on data in a domain. Instead of storing the current state, the system stores a sequence of events. The current state is derived by replaying the events. This provides a complete audit trail and enables temporal queries.


## Use Cases
Use when you need a complete audit trail of data changes, need to support temporal queries, or when complex business logic requires understanding the full history of changes.





## Trade-offs


### Advantages

- Complete audit trail

- Enables temporal queries

- Supports event replay for debugging

- Natural fit for event-driven architectures




### Considerations & Drawbacks

- Complex event schema evolution

- Requires replay for current state

- Can be less performant for read operations







---
**Reference**: [Original Source](https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing)

