I need to send and receive an ack synchronously and for that I am using the RabbitTemplate.
The RabbitTemplate has queue and replyAddress property, but when trying to send me this error appears:
java.lang.IllegalStateException: RabbitTemplate is not configured as MessageListener - can not use a 'replyAddress': amq.gen-t1ESvGc4I8EfGJCjWjBxKw
If I use the Send method instead of SendAndReceive then the process is correct but the response arrives asynchronously to me (I have a MessageListener for that), but is not not what I need.
Is it possible that I can not use the same response queue for RabbitTemplate that I have for the MessageListener?
Thank you again Gary, and sorry because the question is really not clear.
I have a MessageListener working correctly when I send a message, but for some messages I need a synchronous reply. When I use the sendAndReceive method, I get the exception:
java.lang.IllegalStateException: RabbitTemplate is not configured as MessageListener - can not use a 'replyAddress': amq.gen-t1ESvGc4I8EfGJCjWjBxKw
And the RabbitTemplate has the property replyAddress : amq.gen-t1ESvGc4I8EfGJCjWjBxKw
If I use the method send, then the response arrives asynchronous to the MessageListener. But I need a synchronous response for some messages.