Skip to content

Fix consumer count for quorum queues in queue.declare (backport #16185)#16186

Merged
kjnilsson merged 1 commit intov4.3.xfrom
mergify/bp/v4.3.x/pr-16185
Apr 17, 2026
Merged

Fix consumer count for quorum queues in queue.declare (backport #16185)#16186
kjnilsson merged 1 commit intov4.3.xfrom
mergify/bp/v4.3.x/pr-16185

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Apr 17, 2026

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.

This is an automatic backport of pull request #16185 done by [Mergify](https://mergify.com).

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)
@ansd ansd added this to the 4.3.0 milestone Apr 17, 2026
@kjnilsson kjnilsson merged commit a474164 into v4.3.x Apr 17, 2026
189 checks passed
@kjnilsson kjnilsson deleted the mergify/bp/v4.3.x/pr-16185 branch April 17, 2026 09:10
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