Saga Choreography Pattern
Using the Choreography method (distributed)
This type of asynchronous event-driven saga pattern is used when the code running in each service decides how to handle events in its scope and what to do next.?Of course, you can also think of it as a chain of event-driven microservices.?Each service listens to the events of others and emits its own events, which can cause events to be paired with each other.
Using the Choreography method will have the best results when more teams are involved in managing the saga.?One of the advantages of this method is that each team will focus exclusively on the sagas within its range.?On the other hand, there is no need for a separate microservice responsible for coordinating a workflow because there is no central coordinator.
However, this approach can make it difficult to understand more complex workflows and how some services interact.?The absence of a central coordinator in the Choreography method has caused the relevant microservices to listen to failure events in order to return to the previous stage.
you can see an example in my GitHub account :