RabbitMQ and message priority

前端 未结 7 1273
情书的邮戳
情书的邮戳 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:20

    We could make rabbitmq a distributed priority queue by installing the plugin rabbitmq_priority_queue from https://www.rabbitmq.com/community-plugins.html . You have to download the plugin rabbitmq_priority_queue-3.3.x-72d20292.ez and put inside plugins folder of your rabbit mq installation directory. Restart the server. Now you can insert items into the queue with a priority and consume it accordingly , have pasted the sample code in How to poll the RabbitMQ to get messages in order of priority continuously? .

提交回复
热议问题