dimanche 26 avril 2020

Does Saga Pattern able to help to reverse Payouts incase if any Failure occurs?

I am very new to Saga Pattern. I understood that with the help of Saga, we can able to reverse the things if any failure occurs.

Whatever the examples I've seen, they are mostly like Orders Service -> Payment Service -> Other Service, and in Payment service, funds happen from Customer to Merchant, and incase if any failure occurs at Other Service, this payment transaction can be able to reverse because here funds flowing from Merchant to Customer (in reverse failure process)

BUT, my Query is: I have a Reverse scenario like this: Payouts Service -> Customer Service

In Payouts Service, funds happen from Merchant to Customer

Can we able to make Reverse the Transactions for Payouts using Saga in case if any Failure occurs at Customer Service? (ie., Reverse the funds from Customer to Merchant, incase if any failure occurs)

Does above possible using Saga? Hope my query is clear. I will be glad if someone could be able to help me on above.

Aucun commentaire:

Enregistrer un commentaire