quickstarts/pub_sub/javascript/http
Amulya Varote b50d01d947 Removed docker image prefix addition step
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
2022-07-25 12:28:57 -07:00
..
checkout change order_pub_sub to orderpubsub (#654) 2022-04-26 16:10:19 -07:00
order-processor Update pub_sub/javascript/http/order-processor/index.js 2022-06-05 18:43:08 +05:30
README.md Reorder quickstarts so the processor is run before the publisher (#637) 2022-04-07 16:29:15 -07: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 HTTP requests only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

This quickstart includes one publisher:

  • Node client message generator checkout

And one subscriber:

  • Node subscriber order-processor

Run Node message subscriber with Dapr

  1. Install dependencies:
cd ./order-processor
npm install
  1. Run the Node publisher app with Dapr:
dapr run --app-id checkout --components-path ../../../components/  --app-port 5001 -- node .

Run Node message publisher with Dapr

  1. Install dependencies:
cd ./checkout
npm install
  1. Run the Node publisher app with Dapr:
dapr run --app-id checkout --components-path ../../../components/  --app-port 5001 -- node .
dapr stop --app-id checkout
dapr stop --app-id order-processor