quickstarts/pub_sub/csharp-http
Paul Yuknewicz a14374c633 Updated readmes with cross pointers SDK <--> HTTP 2022-02-14 15:57:14 -08:00
..
checkout Consistency pass for strings and logs python/C# 2022-02-14 15:57:11 -08:00
order-processor Draft commit for csharp-http quickstart -- uses no Dapr SDK, only http 2022-02-14 15:55:13 -08:00
README.md Updated readmes with cross pointers SDK <--> HTTP 2022-02-14 15:57:14 -08:00
checkout.sln Minimal .NET 6 code for http post to dapr pub/sub 2022-02-14 15:55:14 -08:00

README.md

Dapr pub/sub (HTTP Client)

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 HTTPClient only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

This quickstart includes one publisher:

  • Dotnet client message generator checkout

And one subscriber:

  • Dotnet subscriber order-processor

Run Dotnet message publisher with Dapr

  1. Open a new terminal window and navigate to checkout directory:
cd checkout
  1. Install dependencies:
dotnet restore
dotnet build
  1. Run the Dotnet publisher app with Dapr:
dapr run --app-id checkout --components-path ../../components/ -- dotnet run

Run Dotnet message subscriber with Dapr

  1. Open a new terminal window and navigate to checkout directory:
cd order-processor
  1. Install dependencies:
dotnet restore
dotnet build
  1. Run the Dotnet subscriber app with Dapr:
dapr run --app-id order-processor --components-path ../../components/ --app-port 7001 -- dotnet run