Am trying to consume the message from exiting queue which is of type Direct Exchange(created with the help of exchange and routing key). I have only the exchange name and routing key and not the queue name. There were support for plain Java, but there was no place where I can find it for Spring boot.
@RabbitListener
@RabbitHandler
public void consumeMessage(Object message) {
LOGGER.debug("Message Consumed.... : {}", message.toString());
}
How can I consume messages with routing key and exchange name not the queue name as @RabbitListener
asks for queue
.
@RabbitListener(queues = "${routing.key}") @RabbitHandler public void consumeMessage(Object message) { LOGGER.debug("Message Consumed.... : {}", message.toString()); }
This is giving a exception 404 -reply-code=404, reply-text=NOT_FOUND - no queue
– SASIKUMAR S