RabbitMQ and message priority

前端 未结 7 1265
情书的邮戳
情书的邮戳 2020-12-13 17:53

Does RabbitMQ have any concept of message priority? I have an issue were some more important messages are being slowed down due to less important messages sitting before it

7条回答
  •  别那么骄傲
    2020-12-13 18:30

    The answers on this question are out-of-date. As of RabbitMQ 3.5.0, there is now in-core support for AMQP standard per-message priorities. The documentation has all the gory details, but in short:

    • You need to define the queue's priority range at the time the queue is created;
    • Messages without a priority set get a priority of 0;
    • Messages with a numeric priority higher than the maximum set on the queue get the highest priority the queue supports.

    More interesting caveats are in the docs. It's well worth reading them.

提交回复
热议问题