1

Is it possible to send a message to a queue using topic, and have 2 consumers who will receive and process the same message? Currently i have created 2 consumers who are observing a queue binding with an exchage topic, but the first consumer consumes the message and removes the queue, and the second consumer does not receive the message.

Tiago Costa
  • 1,004
  • 4
  • 17
  • 31

1 Answers1

1

If you need pub-sub semantics, you should consider to use queue per consumer. That is exactly how AMQP protocol works.

You can borrow some ideas from the official tutorial: https://www.rabbitmq.com/tutorials/tutorial-five-spring-amqp.html

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118