mirror of https://github.com/dapr/quickstarts.git
* Fixes service invocation Go samples Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixes + updates to the pubsub sdk apps too Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More updates Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| checkout | ||
| order-processor | ||
| README.md | ||
| makefile | ||
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 generates messages for a specific topic, while the subscriber listen for messages in specific topics.
Check out the documentation about Dapr pubsub for more details.
Note: This example leverages the Dapr Client SDK. You can find an example using plain HTTP in the
httpfolder.
This quickstart includes one publisher: Go client message generator checkout
And one subscriber: Go subscriber order-processor
Run Go message subscriber with Dapr
- Run the Go subscriber app with Dapr in the
order-processorfolder:
cd ./order-processor
dapr run \
--app-port 6002 \
--app-id order-processor-sdk \
--app-protocol http \
--dapr-http-port 3501 \
--components-path ../../../components \
-- go run .
Run Go message publisher with Dapr
1 Run the Go publisher app with Dapr in the checkout folder:
cd ./checkout
dapr run \
--app-id checkout-sdk \
--dapr-http-port 3500 \
--components-path ../../../components \
-- go run .
To stop:
dapr stop --app-id checkout-sdk
dapr stop --app-id order-processor-sdk