Chapter 5: Publish and Subscribe

Publish/subscribe (pub/sub) is a messaging pattern supported by Distributed Application Runtime (Dapr) to enable decoupled interactions between microservices.

In this chapter, you will understand the benefits of the pub/sub messaging-based pattern and how to implement it in your Dapr applications.

These are the main topics of this chapter:

  • Using the pub/sub pattern in Dapr
  • Using Azure Service Bus (ASB) in Dapr
  • Implementing a saga pattern

Before we delve into the implementation details of pub/sub in Dapr, an overview of the pattern is necessary.

Technical requirements

The code for this sample can be found on GitHub at https://github.com/PacktPublishing/Practical-Microservices-with-Dapr-and-.NET/tree/main/chapter05 ...

Get Practical Microservices with Dapr and .NET 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.