Knowledge base

rabbitmq-consumers verifiedimportantWritten by the Hub

Consumer threads

in the configuration this is a linerabbitmq-consumers: 10

How many threads read from the consumed queue in parallel.

Values

Values
positive integer
Default
10 · taken from the build
applying
restart required
where it can be set
in the config file · with a startup flag · as an environment variable

In detail

Each thread holds its own prefetch window, so the number of messages a node keeps in flight is this value multiplied by rabbitmq-qos. On the stand the queue shows exactly ten consumers, which matches the shipped value — and contradicts the documentation, which states a default of one. Raising it costs memory and broker connections; lowering it below the number of cores rarely helps anything.

What happens if you get it wrong

Left at the shipped ten on a small node.Prefetch multiplies. Measured on mq-01: ten consumers, window 1000 each — up to 10 000 messages claimed at once. On the 2 GB node we were given that is already the dominant memory consumer before a single message is sent.verified by experiment · inference