From 32a1996acb6f429fea720081df7877a8237b5733 Mon Sep 17 00:00:00 2001 From: Amulya Varote Date: Thu, 2 Dec 2021 10:31:20 -0800 Subject: [PATCH] Changed port number in the command Signed-off-by: Amulya Varote --- .../pubsub/howto-publish-subscribe.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index 3a3ffc973..781a2ecfb 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -474,10 +474,14 @@ Start an instance of Dapr with an app-id called `orderprocessing`: ```bash <<<<<<< HEAD +<<<<<<< HEAD dapr run --app-id orderprocessing --dapr-http-port 3601 ======= dapr run --app-id orderprocessing --dapr-http-port 3500 >>>>>>> 0e83af7a (Added pub sub documentation) +======= +dapr run --app-id orderprocessing --dapr-http-port 3601 +>>>>>>> 3380b73a (Changed port number in the command) ``` {{< tabs "Dapr CLI" "HTTP API (Bash)" "HTTP API (PowerShell)">}} @@ -717,11 +721,15 @@ func main() { } defer client.Close() ctx := context.Background() +<<<<<<< HEAD <<<<<<< HEAD //Using Dapr SDK to publish a topic ======= //Using Dapr SDK to publish to a topic >>>>>>> 0e83af7a (Added pub sub documentation) +======= + +>>>>>>> 3380b73a (Changed port number in the command) if err := client.PublishEvent(ctx, PUBSUB_NAME, TOPIC_NAME, []byte(strconv.Itoa(orderId))); err != nil { panic(err) @@ -761,11 +769,15 @@ import { DaprServer, DaprClient, CommunicationProtocolEnum } from 'dapr-client'; const daprHost = "127.0.0.1"; var main = function() { +<<<<<<< HEAD <<<<<<< HEAD var orderId = 100; ======= var orderId = Math.floor(Math.random() * (1000 - 1) + 1); >>>>>>> 0e83af7a (Added pub sub documentation) +======= + var orderId = 100; +>>>>>>> 3380b73a (Changed port number in the command) start(orderId).catch((e) => { console.error(e); process.exit(1); @@ -775,11 +787,14 @@ var main = function() { async function start(orderId) { const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.HTTP); console.log("Published data:" + orderId) +<<<<<<< HEAD <<<<<<< HEAD //Using Dapr SDK to publish a topic ======= //Using Dapr SDK to publish to a topic >>>>>>> 0e83af7a (Added pub sub documentation) +======= +>>>>>>> 3380b73a (Changed port number in the command) await client.pubsub.publish("order_pub_sub", "orders", orderId); }