quickstarts/pub_sub/go/sdk
Alessandro (Ale) Segala b91d817ca5
Fixes some Go samples (#782)
* 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>
2023-02-02 16:31:32 -08:00
..
checkout Fixes some Go samples (#782) 2023-02-02 16:31:32 -08:00
order-processor Fixes some Go samples (#782) 2023-02-02 16:31:32 -08:00
README.md Fixes some Go samples (#782) 2023-02-02 16:31:32 -08: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 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 http folder.

This quickstart includes one publisher: Go client message generator checkout

And one subscriber: Go subscriber order-processor

Run Go message subscriber with Dapr

  1. Run the Go subscriber app with Dapr in the order-processor folder:
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