Queue and exchange recovery for manually created message listener containers #3040
-
I'm trying to understand how listener containers created with the @RabbitListener annotation handle queue and exchange recovery. If the queue being listened to is deleted or becomes unavailable, Spring automatically recovers it and restarts the container when the queue becomes available again.
the container is restarted, but it fails with an exception indicating that the queue is not found.
Where |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
See docs for Broker entities configuration: https://docs.spring.io/spring-amqp/reference/amqp/broker-configuration.html. By default only those exchanges, queues, and binding between them are re-declared on re-connection which are beans in the application context. It is not clear what is your custom listener container, but you can use |
Beta Was this translation helpful? Give feedback.
-
It looks like that is what I need. Thank you for the explanation |
Beta Was this translation helpful? Give feedback.
The logic there in the
AbstractMessageListenerContainer
is like this: