Closed
Description
When receiving messages with RabbitMessagingTemplate.receive() method it tries to receive messages from the default destination set in the RabbitMessagingTemplate which in my case is a routing key since I also use it for sending. I solved the issue by subclassing the RabbitMessagingTemplate with the following implementation of receive which uses the receive queue configured in the RabbitTemplate.
@Override
public Message<?> receive() {
try {
var amqpMessage = getRabbitTemplate().receive();
return convertAmqpMessage(amqpMessage);
} catch (RuntimeException ex) {
throw convertAmqpException(ex);
}
}