I connect to RabbitMQ through a CachingConnectionFactory. This has a simple, built in - forever retry mechanism to recover.
To support dynamic queue management (creation, listening via API), I manipulate the RabbitListenerEndpointRegistry registry;
When the connection to RabbitMQ is interrupted (any network outage), the recovery mechanism is successful. However, the registry is initialized, by Spring.
I have been unable to find a place to hook into the reconnection flow, such that I can rebuild my registry on reconnection. The registry is leveraged by a single @RabbitListener
Where can I execute my own recovery function, eg
dbDao.getActiveQueues().forEach(queueName -> getMessageListenerContainerById(RECEIVED_FROM_CLIENT).addQueueNames(queueName));