Chapter 15: Handling Eventual Consistency with the Compensation Pattern
We will now turn our attention to how microservices communicate with each other and how we handle transactions when each microservice is invoked in the context of its own transaction. We will learn how to handle that issue using eventual consistency, and as a byproduct, we will also see how we can reduce the coupling between our services. We will then learn how to handle errors and do what under commitment control would have been a rollback, by using the compensation pattern. Then, we will learn how to implement what we have learned and how to set up Google Cloud Pub/Sub to support that implementation. Finally, we will deploy and test our updated application.
In this chapter, ...
Get The Definitive Guide to Modernizing Applications on Google Cloud now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.