Skip to content
RabbitMQWorkersBackpressure

RabbitMQ consumer scaling

Throughput comes from prefetch, ack strategy, and partition-like routing keys — not from adding consumers that contend on the same unacked set.

Personal experience

Ecommerce and worker pipelines using RabbitMQ (AMQP): competing consumers, ack strategy, and the difference between a hot routing key and work that can actually scale horizontally.

Technical perspective

Horizontal consumer scaling only works if the broker can deliver independent work. A single hot routing key, a global lock in the worker, or a database upsert on the same row will serialize you regardless of consumer count.

Prefetch is the first knob. Too high, and one slow consumer holds a large unacked set. Too low, and the broker becomes chatty. Ack after the side effect you cannot afford to duplicate — or make the handler idempotent and ack earlier.

Poison messages need a dead-letter path with a bound retry. Infinite requeue is how a bad payload takes down a fleet.

Architecture

Broker, competing consumers, dead letter

Publishers

Exchange

Queue

Worker

Worker

Worker

Dead letter

Technical perspective. Scale consumers only when work is partitionable.