mirror of https://github.com/dapr/docs.git
Incorporate Review Comments
Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>
This commit is contained in:
parent
b23ecff9d1
commit
5fd351fa1f
|
@ -298,14 +298,14 @@ scopes:
|
|||
- checkout
|
||||
```
|
||||
|
||||
In the example above, `bulkSubscribe` altogether is Optional. But, if you decide to use `bulkSubscribe`, then:
|
||||
- `enabled` is mandatory to be given.
|
||||
- You can optionally configure max number of messages (`maxMessagesCount`) that should be delivered to it via Dapr in a bulk message
|
||||
- You can also optionally provide max duration to await (`maxAwaitDurationMs`) before a bulk message is sent via Dapr to App
|
||||
In the example above, `bulkSubscribe` altogether is _optional_. If you decide to use `bulkSubscribe`, then:
|
||||
- `enabled` is mandatory
|
||||
- You can optionally configure the max number of messages (`maxMessagesCount`) delivered via Dapr in a bulk message
|
||||
- You can optionally provide the max duration to wait (`maxAwaitDurationMs`) before a bulk message is sent via Dapr to the app
|
||||
|
||||
In case, Application decides not to configure maxMessagesCount and/or maxAwaitDurationMs, defaults as per respective component in Dapr will be used.
|
||||
If the application decides not to configure `maxMessagesCount` and/or `maxAwaitDurationMs`, the defaults will be used as per the respective component in Dapr.
|
||||
|
||||
Application receives an EntryId associated with each entry (individual message) in this bulk message and this EntryId has to be used by App to communicate back the status of that particular entry. In case, App misses to notify status of an EntryId, it will be considered as RETRY.
|
||||
The application receives an EntryId associated with each entry (individual message) in the bulk message. This EntryId must be used by the app to communicate the status of that particular entry. If the app fails to notify on an EntryId status, it's considered a `RETRY`.
|
||||
|
||||
Status | Description
|
||||
--------- | -----------
|
||||
|
|
|
@ -247,16 +247,18 @@ other | warning is logged and message to be retried
|
|||
|
||||
## Subscribe multiple messages from a given topic
|
||||
|
||||
This allows you, as a consumer, to subscribe multiple messages from a broker to listen to a `topic`.
|
||||
This allows you to subscribe multiple messages from a broker to listen to a `topic`.
|
||||
|
||||
In order to receive messages in a bulk manner for a topic subscription, application needs to opt for `bulkSubscribe` while sending list of topics to be subscribed to, and optionally they can also configure `maxMessagesCount` and/or `maxAwaitDurationMs`.
|
||||
Please refer [Send and receive messages in bulk]({{< ref pubsub-bulk.md >}}) for more details on how to opt-in.
|
||||
In order to receive messages in a bulk manner for a topic subscription, the application:
|
||||
|
||||
- Needs to opt for `bulkSubscribe` while sending list of topics to be subscribed to
|
||||
- Optionally, can configure `maxMessagesCount` and/or `maxAwaitDurationMs`
|
||||
Refer to the [Send and receive messages in bulk]({{< ref pubsub-bulk.md >}}) guide for more details on how to opt-in.
|
||||
|
||||
#### Expected HTTP Response for Bulk Subscribe
|
||||
|
||||
An HTTP 2xx response denotes that entries (individual messages) inside this bulk messgae have been processed by Application and Dapr will now check status pertaining to each entryId.
|
||||
An HTTP 2xx response denotes that entries (individual messages) inside this bulk message have been processed by the application and Dapr will now check each EntryId status.
|
||||
A JSON-encoded payload body with the processing status against each entry needs to be sent:
|
||||
- Note: If status for an entryId is not found by Dapr in response received from Application, status for that entry will be considered as RETRY.
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -267,6 +269,8 @@ A JSON-encoded payload body with the processing status against each entry needs
|
|||
}
|
||||
```
|
||||
|
||||
> Note: If an EntryId status is not found by Dapr in a response received from the application, that entry's status is considered `RETRY`.
|
||||
|
||||
Status | Description
|
||||
--------- | -----------
|
||||
`SUCCESS` | Message is processed successfully
|
||||
|
|
Loading…
Reference in New Issue