Answers for "spring amqp exchange not found"

0

spring amqp exchange not found

Unlike JMS, publishing to RabbitMQ is asynchronous (which is why it's generally faster), so the failure for a missing exchange is reported on a different thread; you can add a listener to get the notification instead of it just being logged.

You can enable transactions template.setChannelTransacted(true); and then the failure will be reported on the publishing thread because it will be blocked waiting for the reply from the txCommit() when the IO error occurs.

However, transactions are quite expensive so can hurt performance.

For other errors (e.g. exchange exists, but no route to a queue), you can use publisher confirms and returns but, again, waiting for a confirmation for each individual message published will slow down performance.
Posted by: Guest on April-25-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language