1

I am trying to create a priority RPC queue that can accept some messages that expect a response and some messages that do not expect a response. The problem I am facing is that when I send messages with convertAndSend I get an error saying "org.springframework.amqp.AmqpException: Cannot determine ReplyTo message property value: Request message does not contain reply-to property, and no default response Exchange was set." I know the issue is that the RPC queue is expecting a response, and the message just stays on the queue, but for these messages I do not want/need a response. Any idea how I can work around this issue?

Thanks, Brian

Brian
  • 556
  • 6
  • 26
  • How about just return `null` for those messages which don't suppose to return reply? – Artem Bilan Dec 11 '18 at 15:11
  • The consumer still waits for a response. I really want these consumers to be a void return so they do not wait. I think I have found a solution... https://stackoverflow.com/questions/45066315/single-queue-multiple-rabbitlistener-but-different-services. Basically I can have different handler for different messages which is really what I need. – Brian Dec 11 '18 at 15:28
  • 1
    The solution in that link above worked for me. Basically I have a class with RabbitListener, and different methods with RabbitHandler – Brian Dec 11 '18 at 22:31
  • That's cool! Place it below as an answer and I'll vote up. Then tomorrow you can accept it by yourself. – Artem Bilan Dec 11 '18 at 22:36

1 Answers1

0

A solution recommended in this link worked for me: Single Queue, multiple @RabbitListener but different services. Basically I have a class with RabbitListener, and different methods with RabbitHandler

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Brian
  • 556
  • 6
  • 26