Fix consumer count for quorum queues in queue.declare (backport #16185)#16186
Merged
Fix consumer count for quorum queues in queue.declare (backport #16185)#16186
Conversation
Previously, `rabbit_fifo_client:stat/2` incorrectly returned the number of checked out messages (`num_checked_out`) instead of the actual number of consumers (`num_consumers`). This caused `queue.declare` operations on quorum queues to return the unacknowledged message count in the `consumer_count` field rather than the true number of active consumers. This commit: - Updates `rabbit_fifo_client:stat/2` to correctly extract `num_consumers` from the ra machine overview. - Adds `queue_declare_passive_consumer_count` to `quorum_queue_SUITE` to verify that passive declares return the correct consumer count when subscribing and cancelling consumers. (cherry picked from commit 4ae20b6)
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.
Previously,
rabbit_fifo_client:stat/2incorrectly returned the number of checked out messages (num_checked_out) instead of the actual number of consumers (num_consumers). This causedqueue.declareoperations on quorum queues to return the unacknowledged message count in theconsumer_countfield rather than the true number of active consumers.This commit:
rabbit_fifo_client:stat/2to correctly extractnum_consumersfrom the ra machine overview.queue_declare_passive_consumer_counttoquorum_queue_SUITEto verify that passive declares return the correct consumer count when subscribing and cancelling consumers.This is an automatic backport of pull request #16185 done by [Mergify](https://mergify.com).