Skip to content

Return policy fields and delivery_limit when stats are disabled (backport #15183)#15653

Closed
mergify[bot] wants to merge 1 commit intov4.2.xfrom
mergify/bp/v4.2.x/pr-15183
Closed

Return policy fields and delivery_limit when stats are disabled (backport #15183)#15653
mergify[bot] wants to merge 1 commit intov4.2.xfrom
mergify/bp/v4.2.x/pr-15183

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Mar 6, 2026

When management_agent.disable_metrics_collector and management.disable_stats are both set to true, the HTTP API returns minimal queue information that excludes policy-related fields and delivery_limit. This causes policy, operator_policy, effective_policy_definition, and delivery_limit to be null in API responses, even though these are configuration metadata rather than statistics.

This change adds these four fields to the format/2 function in both rabbit_classic_queue and rabbit_quorum_queue modules. The fields now appear in the type-specific formatting that runs regardless of metrics collection status. The three policy fields use existing i/2 function implementations that call rabbit_policy module functions. For delivery_limit, this change adds an i(delivery_limit, Q) function to rabbit_quorum_queue that extracts the delivery limit from the queue's x-delivery-limit argument, returning unlimited when not set.

Fixes #15182


This is an automatic backport of pull request #15183 done by Mergify.

When `management_agent.disable_metrics_collector` and
`management.disable_stats` are both set to `true`, the HTTP API returns
minimal queue information that excludes policy-related fields and
`delivery_limit`. This causes `policy`, `operator_policy`,
`effective_policy_definition`, and `delivery_limit` to be `null` in API
responses, even though these are configuration metadata rather than
statistics.

This change adds these four fields to the `format/2` function in both
`rabbit_classic_queue` and `rabbit_quorum_queue` modules. The fields now
appear in the type-specific formatting that runs regardless of metrics
collection status. The three policy fields use existing `i/2` function
implementations that call `rabbit_policy` module functions. For
`delivery_limit`, this change adds an `i(delivery_limit, Q)` function to
`rabbit_quorum_queue` that extracts the delivery limit from the queue's
`x-delivery-limit` argument, returning `unlimited` when not set.

Fixes #15182

(cherry picked from commit 7f4334b)
@michaelklishin
Copy link
Copy Markdown
Collaborator

This backport is not needed, these changes were merged in #15652.

@michaelklishin michaelklishin deleted the mergify/bp/v4.2.x/pr-15183 branch March 6, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants