remove broadcast part (#374)

This commit is contained in:
Yaron Schneider 2020-03-02 11:48:59 -08:00 committed by GitHub
parent 2f7a3373f2
commit c63784fc8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 76 deletions

View File

@ -1,4 +1,4 @@
# Pub Sub and Broadcast
# Pub Sub
## Publish a message to a given topic
@ -33,81 +33,6 @@ curl -X POST http://localhost:3500/v1.0/publish/deathStarStatus \
}'
```
## Broadcast a message to a list of recipients
This endpoint lets you publish a payload to a named list recipients who are listening on a given ```topic```.
The list of recipients may include the unique identifiers of other apps (used by Dapr for messaging) and also Dapr bindings.
### HTTP Request
```http
POST http://localhost:<daprPort>/v1.0/publish/<topic>
```
### HTTP Response codes
Code | Description
---- | -----------
200 | Message delivered
500 | Delivery failed
### URL Parameters
Parameter | Description
--------- | -----------
daprPort | the Dapr port
topic | the name of the topic
> Example of publishing a message to another Dapr app:
```shell
curl -X POST http://localhost:3500/v1.0/publish \
-H "Content-Type: application/json" \
-d '{
"topic": "DeathStarStatus",
"data": {
"status": "completed"
},
"to": [
"otherApp"
]
}'
```
> Example of publishing a message to an Dapr binding:
```shell
curl -X POST http://localhost:3500/v1.0/publish \
-H "Content-Type: application/json" \
-d '{
"topic": "DeathStarStatus",
"data": {
"status": "completed"
},
"to": [
"azure-queues"
]
}'
```
> Example of publishing a message to multiple consumers in parallel:
```shell
curl -X POST http://localhost:3500/v1.0/publish \
-H "Content-Type: application/json" \
-d '{
"eventName": "DeathStarStatus",
"data": {
"status": "completed"
},
"to": [
"otherApp",
"azure-queues"
],
"concurrency": "parallel"
}'
```
## Handling topic subscriptions
In order to receive topic subscriptions, Dapr will invoke the following endpoint on user code: