mirror of https://github.com/dapr/docs.git
Merge pull request #1117 from kzmake/support-priority-queue-for-rabbitmq-bindings
Add documentation to rabbitmq bindings for Priority Queue
This commit is contained in:
commit
f17e18fb41
|
@ -31,6 +31,8 @@ spec:
|
||||||
value: 0
|
value: 0
|
||||||
- name: exclusive
|
- name: exclusive
|
||||||
value: false
|
value: false
|
||||||
|
- name: maxPriority
|
||||||
|
value: 5
|
||||||
```
|
```
|
||||||
|
|
||||||
- `queueName` is the RabbitMQ queue name.
|
- `queueName` is the RabbitMQ queue name.
|
||||||
|
@ -40,6 +42,7 @@ spec:
|
||||||
- `ttlInSeconds` is an optional parameter to set the [default message time to live at RabbitMQ queue level](https://www.rabbitmq.com/ttl.html). If this parameter is omitted, messages won't expire, continuing to exist on the queue until processed.
|
- `ttlInSeconds` is an optional parameter to set the [default message time to live at RabbitMQ queue level](https://www.rabbitmq.com/ttl.html). If this parameter is omitted, messages won't expire, continuing to exist on the queue until processed.
|
||||||
- `prefetchCount` is an optional parameter to set the [Channel Prefetch Setting (QoS)](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch). If this parameter is omiited, QoS would set value to 0 as no limit.
|
- `prefetchCount` is an optional parameter to set the [Channel Prefetch Setting (QoS)](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch). If this parameter is omiited, QoS would set value to 0 as no limit.
|
||||||
- `exclusive` determines whether the topic will be an exclusive topic or not
|
- `exclusive` determines whether the topic will be an exclusive topic or not
|
||||||
|
- `maxPriority` is an optional parameter to set the [priority queue](https://www.rabbitmq.com/priority.html). If this parameter is omitted, queue will be created as a general queue instead of a priority queue.
|
||||||
|
|
||||||
{{% alert title="Warning" color="warning" %}}
|
{{% alert title="Warning" color="warning" %}}
|
||||||
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
|
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
|
||||||
|
@ -69,6 +72,30 @@ curl -X POST http://localhost:3500/v1.0/bindings/myRabbitMQ \
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Specifying a priority on message level
|
||||||
|
|
||||||
|
Priority can be defined at the message level. If `maxPriority` parameter is set, high priority messages will have priority over other low priority messages.
|
||||||
|
|
||||||
|
To set priority at message level use the `metadata` section in the request body during the binding invocation.
|
||||||
|
|
||||||
|
The field name is `priority`.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -X POST http://localhost:3500/v1.0/bindings/myRabbitMQ \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"data": {
|
||||||
|
"message": "Hi"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"priority": "5"
|
||||||
|
},
|
||||||
|
"operation": "create"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
## Output Binding Supported Operations
|
## Output Binding Supported Operations
|
||||||
|
|
||||||
* create
|
* create
|
||||||
|
|
Loading…
Reference in New Issue