mirror of https://github.com/dapr/docs.git
resolved merge conflicts
Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
This commit is contained in:
parent
bd6d5e75af
commit
099ea6e99d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue