Return policy fields and delivery_limit when stats are disabled#15183
Open
lukebakken wants to merge 1 commit intorabbitmq:mainfrom
Open
Return policy fields and delivery_limit when stats are disabled#15183lukebakken wants to merge 1 commit intorabbitmq:mainfrom
delivery_limit when stats are disabled#15183lukebakken wants to merge 1 commit intorabbitmq:mainfrom
Conversation
0268c96 to
939fc4e
Compare
939fc4e to
90c3700
Compare
gomoripeti
reviewed
Dec 22, 2025
90c3700 to
bce2d3d
Compare
delivery_limit when stats are disabled
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 rabbitmq#15182
bce2d3d to
7142de4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
management_agent.disable_metrics_collectorandmanagement.disable_statsare both set totrue, the HTTP API returns minimal queue information that excludes policy-related fields anddelivery_limit. This causespolicy,operator_policy,effective_policy_definition, anddelivery_limitto benullin API responses, even though these are configuration metadata rather than statistics.This change adds these four fields to the
format/2function in bothrabbit_classic_queueandrabbit_quorum_queuemodules. The fields now appear in the type-specific formatting that runs regardless of metrics collection status. The three policy fields use existingi/2function implementations that callrabbit_policymodule functions. Fordelivery_limit, this change adds ani(delivery_limit, Q)function torabbit_quorum_queuethat extracts the delivery limit from the queue'sx-delivery-limitargument, returningunlimitedwhen not set.Fixes #15182