Summary
In this chapter, we learned how to adopt the pub/sub building block of Dapr to decouple communication between microservices in a way that is far more efficient than we achieved with service-to-service direct invocation, but not without additional effort.
We figured out how to configure the pub/sub component with ASB and how to use the Dapr .NET SDK to instruct ASP.NET controllers to pub/sub messages.
Finally, we discussed the saga design pattern to tackle the complexity of distributed data consistency without resorting to distributed transactions and implemented it in our sample scenario.
In the next chapter, we will explore the resource-binding building block to interact with external services and events.