quickstarts/pub_sub/csharp/sdk
Jaime Still b2d3da4d7a update service_invocation + pub_sub READMEs
Signed-off-by: Jaime Still <jpstill85@gmail.com>
2023-03-30 11:20:12 -04:00
..
checkout Updating C# quickstart and tutorial Dapr SDK references to 1.8. They… (#705) 2022-07-27 10:31:17 -07:00
order-processor correct pub_sub csharp sdk order-processor port 2023-03-30 11:00:53 -04:00
README.md update service_invocation + pub_sub READMEs 2023-03-30 11:20:12 -04:00
makefile Removed docker image prefix addition step 2022-07-25 12:28:57 -07:00

README.md

Dapr pub/sub

In this quickstart, you'll create a publisher microservice and a subscriber microservice to demonstrate how Dapr enables a publish-subcribe pattern. The publisher will generate messages of a specific topic, while subscribers will listen for messages of specific topics. See Why Pub-Sub to understand when this pattern might be a good choice for your software architecture.

Visit this link for more information about Dapr and Pub-Sub.

Note: This example leverages the Dapr client SDK. If you are looking for the example using only HTTP click here.

This quickstart includes one publisher:

  • Dotnet client message generator checkout

And one subscriber:

  • Dotnet subscriber order-processor

Run Dotnet message subscriber with Dapr

  1. Navigate to the directory and install dependencies:
cd ./order-processor
dotnet restore
dotnet build
  1. Run the Dotnet subscriber app with Dapr:
dapr run --app-id order-processor --resources-path ../../../components/ --app-port 7002 -- dotnet run --project .

Run Dotnet message publisher with Dapr

  1. Navigate to the directory and install dependencies:
cd ./checkout
dotnet restore
dotnet build
  1. Run the Dotnet publisher app with Dapr:
dapr run --app-id checkout-sdk --resources-path ../../../components/ -- dotnet run --project .
dapr stop --app-id order-processor
dapr stop --app-id checkout-sdk