# Choreography-Based Saga

> Coordinate a saga by having each participant publish domain events that trigger the next participant.

- **Category**: Event Driven Architecture
- **Subcategory**: core
- **Canonical URL**: https://designpattern.fyi/patterns/choreography_saga/

---

## Description
**Context**: You have applied the Saga pattern to implement distributed transactions across multiple services. You need to decide how to coordinate the saga participants.

**Problem**: How to coordinate saga participants without a central orchestrator?

**Solution**: Implement each saga step as a service that publishes domain events that trigger the next step. Each participant listens for events, performs its local transaction, and publishes a new event. For example, in an order creation saga: the Order Service creates an order and publishes OrderCreated. The Customer Service listens for OrderCreated, reserves credit, and publishes CreditReserved. The Order Service listens for CreditReserved and approves the order. If any step fails, the participant publishes a failure event that triggers compensating transactions in the preceding participants.



## Use Cases
Use for simple sagas with few participants where the flow is linear and easy to understand without central coordination.





## Trade-offs


### Advantages

- Simple to implement for straightforward workflows with few participants

- No single point of failure from a central orchestrator

- Loosely coupled—each service only needs to know about the events it consumes and produces

- Good for simple, linear workflows




### Considerations & Drawbacks

- Difficult to understand and debug as the number of participants grows

- Risk of cyclic dependencies between services

- Hard to implement complex coordination logic or conditional branching

- Adding new steps requires modifications across multiple services







---
**Reference**: [Original Source](https://microservices.io/patterns/data/saga.html)

