Australian cloud for business software — built and run in Sydney since 2003

NetLeverage
NetLeverage

RabbitMQ Queue Grows but Consumers Are Connected: Inspect Unacknowledged Work

Technical article
Troubleshooting

A connected RabbitMQ consumer is not proof that messages are completing. Separate messages ready for delivery from deliveries awaiting acknowledgement, then compare delivery and acknowledgement rates with the consumer's own processing evidence.1, 3

A growing unacknowledged population can mean slow processing, blocked dependencies, excessive work in flight or a missing acknowledgement path. A growing ready population can mean arrivals exceed useful completion capacity. The shape of the backlog narrows the investigation; it does not identify the cause alone.

This article uses RabbitMQ documentation displaying version 4.4 and AMQP 0-9-1 semantics. Confirm the deployed version and queue type before applying those details.

Distinguish the three completion boundaries

Publisher confirms concern the publisher's interaction with RabbitMQ. Consumer acknowledgements concern deliveries from RabbitMQ to consumers. The documentation explicitly describes these mechanisms as independent; a publisher confirm does not report successful consumer processing.1

Business completion is another boundary. The application decides when its work is sufficiently complete to acknowledge. RabbitMQ cannot infer whether an invoice was correctly recorded or an external API operation had its intended effect from the fact that a consumer is connected.

Record the acknowledgement mode and the application contract. In automatic acknowledgement mode, RabbitMQ considers delivery successful after sending it, with weaker processing safety if the consumer fails. Manual acknowledgement provides a later explicit decision point.1

Changing to automatic acknowledgement can make unacknowledged counts disappear while weakening the evidence of completed work. It is not a diagnostic repair for a stuck consumer.

Read ready and unacknowledged together

RabbitMQ monitoring distinguishes ready messages from unacknowledged messages and reports their sum as the total message count. Delivery, acknowledgement and application processing rates add the time dimension.3

If ready messages increase while unacknowledged messages remain near the effective prefetch limit, consumers may be holding all available delivery slots. Investigate their current work and acknowledgement paths.

If delivery and acknowledgement rates are healthy but arrivals are higher, the queue can still grow because capacity is insufficient for that workload. If delivery rate is high but business completion is low, investigate retries, rejection paths and the meaning of the reported rates.

A single snapshot cannot establish a trend. Use a defined interval and retain queue identity, virtual host, queue type, consumer count and relevant policy. Do not merge measurements from different queues just because their names are similar.

Follow one delivery through the consumer

A useful application trace records receipt, processing start, relevant dependency operations, business completion and the acknowledgement decision. Use a non-sensitive correlation identifier and preserve timing without logging message payloads unnecessarily.

Determine where the delay accumulates. A consumer can stay connected while its processing threads wait on a database, a lock or an unavailable service. Connection health and business throughput need separate checks.

Inspect success, failure and cancellation paths. A delivery that is acknowledged on the normal path but left outstanding after an exception can gradually occupy the available delivery window.

Delivery tags are scoped to a channel. RabbitMQ requires acknowledgements on the channel that received the delivery. Double acknowledgements or unknown tags can produce protocol errors and close the channel.1

When processing concurrently, review batched acknowledgements carefully. The protocol's multiple flag acknowledges outstanding delivery tags up to the supplied tag on that channel. It must not be used to mark unfinished work complete merely because a later task finished first.1

Prefetch controls outstanding work, not business capacity

Prefetch limits the number of unacknowledged deliveries allowed in flight. When the relevant limit is reached, further delivery waits for acknowledgements. Increasing it can allow more work to sit at consumers without making that work complete faster.1

RabbitMQ's consumer-prefetch guide explains its per-consumer interpretation and how a separately applied channel-wide limit can coexist. Check the actual configuration and scope; do not multiply one number by consumers or channels without understanding those rules.4

A prefetch value of zero means no protocol-level limit in the documented AMQP setting, but the message source or queue type can still impose limits. “Zero” does not mean no deliveries, and it should not be chosen as a generic throughput fix.1

Choose prefetch through an approved workload test that measures throughput, processing latency, memory and fairness between consumers. Include slow messages and failure paths. No universal value can be justified from queue length alone.

Redelivery changes what a restart means

With manual acknowledgements, unacknowledged deliveries are requeued when their channel or connection closes. Detecting a failed client can take time. Consumers must therefore be prepared for redelivery.1

Consider a hypothetical consumer that commits a database change and then loses its connection before RabbitMQ receives the acknowledgement. The message can return even though the business side effect already happened. A restart may move the backlog while exposing this duplicate-processing window.

Design the business operation to handle repeats safely, using an appropriate durable identity or deduplication boundary. The correct transaction design depends on the application; acknowledgements alone do not establish exactly-once business execution.

Do not restart all consumers merely to clear unacknowledged counts. First understand the work in progress, duplicate-handling design and consequences of redelivery. A smaller queue after restart is not sufficient verification.

Distinguish useful retry from a redelivery loop

Negative acknowledgements can requeue a delivery or, with requeue disabled, route it to a configured dead-letter exchange or discard it. Those are materially different outcomes.1

If every consumer immediately requeues the same failing work, RabbitMQ warns that a requeue/redelivery loop can waste network and CPU resources. High delivery activity can then coexist with little useful completion.1

Record redelivery behaviour and the recurring error before choosing a retry policy. A bounded delay, quarantine or operator decision may be appropriate, but each requires an application-specific retention and recovery design.

This article supplies no purge, reject-all or replay command. Such operations can destroy or duplicate business work and cannot be justified by a backlog graph alone.

Check version and queue-type timeout rules

The retrieved consumer guide states that from RabbitMQ 4.3, delivery acknowledgement timeouts are supported only by quorum queues. For the 4.4 documentation scope used here, do not apply the timeout description universally to classic queues.2

Where the mechanism applies, a timed-out acknowledgement can close the channel and requeue its outstanding deliveries. Review the exact broker error and the intended maximum processing time before considering a timeout change.2

Similarly, consumer capacity is a hint about the queue's ability to deliver immediately, not a business-success percentage. The guide notes that a queue with consumers but no message flow can report 100% capacity.2

Verify useful completion

After an approved correction, compare ready and unacknowledged trends, processing latency, acknowledgement and redelivery rates, and business outcomes. Verify both normal messages and the failure pattern that caused the incident.

Separate draining an existing backlog from sustaining new arrivals. A short quiet period may drain the queue without demonstrating adequate ongoing capacity.

The final finding should connect the original bottleneck or acknowledgement defect to the corrected consumer behaviour. Keep unverified business outcomes explicit even when broker metrics improve.

Learning notes

  • Publisher confirms, consumer acknowledgements and business completion are separate boundaries.
  • Prefetch bounds outstanding deliveries; it does not create processing capacity.
  • Redelivery requires duplicate-safe business handling.
  • Queue type and RabbitMQ version affect acknowledgement-timeout behaviour.

Acceptance checklist

  • [ ] Ready and unacknowledged work are separated from publisher confirmations.
  • [ ] Consumer processing and acknowledgement/redelivery evidence identify the bottleneck.
  • [ ] Failure handling is duplicate-safe and respects version/queue-type behaviour.
  • [ ] Approved validation demonstrates both backlog recovery and sustained useful business completion.

References

  1. Consumer Acknowledgements and Publisher Confirms | RabbitMQ. Accessed 2026-11-01.
  2. Consumers | RabbitMQ. Accessed 2026-11-01.
  3. Monitoring | RabbitMQ. Accessed 2026-11-01.
  4. Consumer Prefetch | RabbitMQ. Accessed 2026-11-01.

Related articles