Search code examples
rabbitmqspring-amqpspring-rabbit

Spring AMQP RabbitMQ - Error Handling for Direct reply-to


I am trying to handle exceptions that are resulting from a amq.rabbitmq.reply-to queue specificially things like: "org.springframework.amqp.AmqpRejectAndDontRequeueException: Reply received after timeout". How can I configure something so I can handle these exceptions? I have tried setting the setErrorHandler properity, but it appears to do nothing. If I get an error on my input queue the handler works, but not with the RPC response queue. Any ideas?

Thanks in advance, Brian


Solution

  • As discussed in Spring AMQP RabbitMQ RPC - Handle response exceptions you need an explicit reply container to handle replies with more sophistication; you can wire an error handler into that container.

    There is currently no support for adding an error handler to the built-in direct reply-to container.

    Consider opening a new feature issue.

    This would be a rather trivial enhancement.