Skip to content

Commit

Permalink
Edits #2057
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Sep 10, 2024
1 parent 1463c55 commit 4a2c82b
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 6 deletions.
9 changes: 7 additions & 2 deletions docs/queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,16 @@ The map is used by various features and plugins such as
* Queue type (e.g. [quorum](./quorum-queues) or [classic](./classic-queues))
* [Message and queue TTL](./ttl)
* [Queue length limit](./maxlength)
* Max number of [priorities](./priority)
* [Consumer priorities](./consumer-priority)
* Quorum queue [redelivery limit](./quorum-queues#poison-message-handling)
* Max number of [priorities](./priority) of a classic queue

and so on.

The same idea is also used with other protocol operations, for example, when
registering a consumer:

* [Consumer priorities](./consumer-priority)

Most optional arguments can be dynamically changed after queue declaration but there are
exceptions. For example, [queue type](./quorum-queues) (`x-queue-type`) and max number
of [queue priorities](./priority) (`x-max-priority`) must be set at queue declaration time
Expand Down
63 changes: 61 additions & 2 deletions docs/quorum-queues/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ dropped messages are retained for some time after.
:::important

Starting with RabbitMQ 4.0, the delivery limit for quorum queues defaults to 20.
The old unlimited default can be restored by setting a queue argument or policy
with `delivery-limit=-1`

The 3.13.x era behavior where there was no lilmit can be restored by setting the limit to `-1`
using an [optional queue argument](./queues#optional-arguments) at declaration time or using a policy as demonstrated below.


:::
Expand All @@ -371,6 +372,8 @@ See [repeated requeues](#repeated-requeues) for more details.

It is possible to set a delivery limit for a queue using a [policy](./parameters#policies) argument, `delivery-limit`.

#### Overriding the Limit

The following example sets the limit to 50 for queues whose names begin with
`qq`.

Expand Down Expand Up @@ -425,6 +428,62 @@ PUT /api/policies/%2f/qq-overrides
</TabItem>
</Tabs>

#### Disaling the Limit

The following example disables the limit for queues whose names begin with
`qq.unlimited`.

<Tabs groupId="shell-specific">
<TabItem value="bash" label="bash" default>
```bash
rabbitmqctl set_policy qq-overrides \
"^qq\.unlimited" '{"delivery-limit": -1}' \
--priority 20 \
--apply-to "quorum_queues"
```
</TabItem>

<TabItem value="PowerShell" label="PowerShell">
```PowerShell
rabbitmqctl.bat set_policy qq-overrides ^
"^qq\.unlimited" "{""delivery-limit"": -1}" ^
--priority 20 ^
--apply-to "quorum_queues"
```
</TabItem>

<TabItem value="HTTP API" label="HTTP API">
```ini
PUT /api/policies/%2f/qq-overrides
{"pattern": "^qq\.unlimited",
"definition": {"delivery-limit": -1},
"priority": 1,
"apply-to": "quorum_queues"}
```
</TabItem>

<TabItem value="Management UI" label="Management UI">
<ol>
<li>
Navigate to `Admin` > `Policies` > `Add / update a
policy`.
</li>
<li>
Enter a policy name (such as "qq-overrides") next to Name, a pattern (such as "^qq\.unlimited") next to
Pattern, and select what kind of entities (quorum queues in this example) the policy should apply to using the `Apply to`
drop down.
</li>
<li>
Enter "delivery-limit" for policy argument and -1 for its value in the first line next to
`Policy`.
</li>
<li>
Click `Add policy`.
</li>
</ol>
</TabItem>
</Tabs>

### Configuring the Limit and Setting Up Dead-Lettering {#position-message-handling-configuring-dlx}

Messages that are redelivered more times than the limit allows for will be either dropped (removed) or [dead-lettered](./dlx).
Expand Down
9 changes: 7 additions & 2 deletions versioned_docs/version-3.13/queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,16 @@ The map is used by various features and plugins such as
* Queue type (e.g. [quorum](./quorum-queues) or [classic](./classic-queues))
* [Message and queue TTL](./ttl)
* [Queue length limit](./maxlength)
* Max number of [priorities](./priority)
* [Consumer priorities](./consumer-priority)
* Quorum queue [redelivery limit](./quorum-queues#poison-message-handling)
* Max number of [priorities](./priority) of a classic queue

and so on.

The same idea is also used with other protocol operations, for example, when
registering a consumer:

* [Consumer priorities](./consumer-priority)

Most optional arguments can be dynamically changed after queue declaration but there are
exceptions. For example, [queue type](./quorum-queues) (`x-queue-type`) and max number
of [queue priorities](./priority) (`x-max-priority`) must be set at queue declaration time
Expand Down

0 comments on commit 4a2c82b

Please sign in to comment.