Fix redundant field (#757)

This commit is contained in:
Yaron Schneider 2020-08-20 09:54:16 -07:00 committed by GitHub
parent a667eb4d12
commit 93837dc2c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -52,9 +52,7 @@ const port = 3000
{
pubsubname: "pubsub",
topic: "newOrder",
route: "orders",
pubsubName: "messagebus"
}
route: "orders" }
]);
})</b>
@ -65,7 +63,7 @@ app.post('/orders', (req, res) => {
app.listen(port, () => console.log(`consumer app listening on port ${port}!`))
</pre>
In the payload returned to Dapr, `topic` tells Dapr which topic to subscribe to, `route` tells Dapr which endpoint to call on when a message comes to that topic, and `pubsubName` tells Dapr which pub/sub component it should use. In this example this is `messagebus` as this is the name of the component we outlined above.
In the payload returned to Dapr, `topic` tells Dapr which topic to subscribe to, `route` tells Dapr which endpoint to call on when a message comes to that topic, and `pubsubName` tells Dapr which pub/sub component it should use. In this example this is `pubsub` as this is the name of the component we outlined above.
## Consume messages
@ -79,9 +77,7 @@ app.get('/dapr/subscribe', (req, res) => {
{
pubsubname: "pubsub",
topic: "onCreated",
route: "custom/path",
pubsubName: "messagebus"
}
route: "custom/path" }
]);
})