RabbitMQ / AMQP: single queue, multiple consumers for same message?

前端 未结 12 2269
不思量自难忘°
不思量自难忘° 2020-11-28 00:53

I am just starting to use RabbitMQ and AMQP in general.

  • I have a queue of messages
  • I have multiple consumers, which I would like to do different thing
12条回答
  •  萌比男神i
    2020-11-28 01:51

    There is one interesting option in this scenario I haven`t found in answers here.

    You can Nack messages with "requeue" feature in one consumer to process them in another. Generally speaking it is not a right way, but maybe it will be good enough for someone.

    https://www.rabbitmq.com/nack.html

    And beware of loops (when all concumers nack+requeue message)!

提交回复
热议问题