Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Sagas for data consistency #8

Open
elshanakberov opened this issue Jul 16, 2021 · 0 comments
Open

Implement Sagas for data consistency #8

elshanakberov opened this issue Jul 16, 2021 · 0 comments
Assignees
Projects

Comments

@elshanakberov
Copy link
Owner

elshanakberov commented Jul 16, 2021

Happy path through saga is as follows

  1. Order Service creates an Order in the APPROVAL_PENDING state and publishes OrderCreated event.
  2. Kitchen Service consumes the OrderCreated event and creates a Ticket in a CREATE_PENDING state and publishes TicketCreated event.
  3. Payment Service consumes the TicketCreated event and creates a Payment and publishes the PaymentCreated event.
  4. Kitchen Service consumes the PaymentCreated event and changes the state of the Ticket to AWATING_ACCEPTANCE.
  5. Order Service consumes the PaymentCreated event and changes the state of the Order to APPROVED and publishes an OrderApproved event.

Unhappy path through saga is as follows

  1. Order Service creates an Order in the APPROVAL_PENDING state and publishes OrderCreated event.
  2. Kitchen Service consumes the OrderCreated event and creates a Ticket in a CREATE_PENDING state and publishes TicketCreated event.
  3. Payment Service consumes the TicketCreated event and creates a Payment and publishes the PaymentCreateFailed event.
  4. Kitchen Service consumes the PaymentCreateFailed event and changes the state of the Ticket to REJECTED.
  5. Order Service receives the PaymentCreateFailed event and changes the state of the Order to REJECTED.
@elshanakberov elshanakberov added this to To do in Development Dec 17, 2021
@elshanakberov elshanakberov moved this from To do to In progress in Development Dec 17, 2021
@elshanakberov elshanakberov self-assigned this Dec 17, 2021
@elshanakberov elshanakberov pinned this issue Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development
In progress
Development

No branches or pull requests

1 participant