From 099ea6e99d326e25dbc3dadf48f11473b512bbb4 Mon Sep 17 00:00:00 2001 From: Amulya Varote Date: Wed, 8 Dec 2021 22:35:22 -0800 Subject: [PATCH] resolved merge conflicts Signed-off-by: Amulya Varote --- .../building-blocks/pubsub/howto-publish-subscribe.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ac921b27d..2f6cf53a4 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 @@ -986,6 +986,7 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g //dependencies import { DaprServer, DaprClient, CommunicationProtocolEnum } from 'dapr-client'; +//code const daprHost = "127.0.0.1"; <<<<<<< HEAD @@ -1041,11 +1042,10 @@ var main = function() { >>>>>>> 0008ac3b (Modified based on the review comments - 1) async function start(orderId) { - const PUBSUB_NAME = "order_pub_sub" - const TOPIC_NAME = "orders" const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.HTTP); console.log("Published data:" + orderId) //Using Dapr SDK to publish a topic +<<<<<<< HEAD <<<<<<< HEAD await server.pubsub.subscribe(PUBSUB_NAME, TOPIC_NAME, async (orderId) => { console.log(`Subscriber received: ${JSON.stringify(orderId)}`) @@ -1055,6 +1055,9 @@ async function start(orderId) { ======= await client.pubsub.publish(PUBSUB_NAME, TOPIC_NAME, orderId); >>>>>>> 0008ac3b (Modified based on the review comments - 1) +======= + await client.pubsub.publish("order_pub_sub", "orders", orderId); +>>>>>>> 56e9c801 (resolved merge conflicts) } function sleep(ms) {