From the course: Dapr for Azure Developers with .NET Part 1

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Subscribing to messages in the Rescue microservice

Subscribing to messages in the Rescue microservice - Azure Tutorial

From the course: Dapr for Azure Developers with .NET Part 1

Subscribing to messages in the Rescue microservice

- [Instructor] We're already publishing events in the Pet microservice. Now, we need to set the Rescue microservice as a subscriber. To do that, we need to add a reference to the Dapr.AspNetCore NuGet Package. to the Dapr.AspNetCore NuGet Package. We're going to install that. We're ready to close this panel. We're going to modify the program CS file, because we need to add the Dapr middleware right here, because we need to add the Dapr middleware right here, just like that. Here, we're going to in bold UseCloudEvents. Here, we're going to in bold UseCloudEvents. This is because the Popsoff building block is based on the CloudEvents specification. Also, we're going to use the MapSubscribeHandler. This is because this will map the handler capable of receiving messages from the Popsoff building block. Actually, we're going to do that in a minute. Okay, let's save this. Okay, let's save this. Now, we're ready to add a new…

Contents