There is a specific detail about priority queues that I can't find a definitive answer on. RabbitMQ documentation states that:
x-max-priority
, and recommends setting the value between 1 and 5 (or 1 and 10 in some places).x-max-priority
for the queue is capped at the value x-max-priority
.If I create a queue with, for example, x-max-priority
of 3, does this mean that I actually have four priority levels (0 through 3), which also assumes that 0 is the lowest priority? What about a x-max-priority
of 1--does that give me two priority levels (0 and 1)?
Yes. My understanding is that it's a zero-based numbering system. Messages sent without a priority
key are assigned priority: 0
, which is the lowest priority level.
If I create a queue with, for example, x-max-priority of 3, does this mean that I actually have four priority levels (0 through 3), which also assumes that 0 is the lowest priority?
Correct.
What about a x-max-priority of 1--does that give me two priority levels (0 and 1)?
Correct.