diff --git a/docs/queues.md b/docs/queues.md index 7b339c4fe..bc8402ad0 100644 --- a/docs/queues.md +++ b/docs/queues.md @@ -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 diff --git a/docs/quorum-queues/index.md b/docs/quorum-queues/index.md index 159a24041..3821331aa 100644 --- a/docs/quorum-queues/index.md +++ b/docs/quorum-queues/index.md @@ -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. ::: @@ -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`. @@ -425,6 +428,62 @@ PUT /api/policies/%2f/qq-overrides +#### Disaling the Limit + +The following example disables the limit for queues whose names begin with +`qq.unlimited`. + + + +```bash +rabbitmqctl set_policy qq-overrides \ + "^qq\.unlimited" '{"delivery-limit": -1}' \ + --priority 20 \ + --apply-to "quorum_queues" +``` + + + +```PowerShell +rabbitmqctl.bat set_policy qq-overrides ^ + "^qq\.unlimited" "{""delivery-limit"": -1}" ^ + --priority 20 ^ + --apply-to "quorum_queues" +``` + + + +```ini +PUT /api/policies/%2f/qq-overrides + {"pattern": "^qq\.unlimited", + "definition": {"delivery-limit": -1}, + "priority": 1, + "apply-to": "quorum_queues"} +``` + + + +
    +
  1. + Navigate to `Admin` > `Policies` > `Add / update a + policy`. +
  2. +
  3. + 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. +
  4. +
  5. + Enter "delivery-limit" for policy argument and -1 for its value in the first line next to + `Policy`. +
  6. +
  7. + Click `Add policy`. +
  8. +
+
+
+ ### 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). diff --git a/versioned_docs/version-3.13/queues.md b/versioned_docs/version-3.13/queues.md index f6b3fb66a..4f1bf647c 100644 --- a/versioned_docs/version-3.13/queues.md +++ b/versioned_docs/version-3.13/queues.md @@ -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