I have a Spring Boot server that collects 2 gRPC microservices - one of them works with the DynamoDB and another CockrachDB database. I need to make sure the commit works fine in both of the DB's and if not need to roll back from both of them.
The issue is if this is successful in the first DB and has an exception into the 2nd, it may not be possible normally to rollback from the 1st DB.
How can I achieve so the commit is either successful or failed in both of the DB's together?
For distributed transaction management frameworks or architectures, you can refer to these links:
Hope these links can help.