Closed
Description
In what version(s) of Spring AMQP are you seeing this issue?
3.0.2 (latest)
Describe the bug
After the connection to the broker has been recovered, the RabbitAdmin which I used to declare queues manually, doesn't declare the manual declarables (even when reDaclareManualDeclaration
is set to true). It happens because there is no application context configured within the RabbitAdmin instance
public void initialize() {
if (this.applicationContext == null) {
this.logger.debug("no ApplicationContext has been set, cannot auto-declare Exchanges, Queues, and Bindings");
return;
}
To Reproduce
- Create a connection to a RabbitMQ broker
- initialize RabbitAdmin instance (new RabbitAdmin(connection))
- set
reDaclareManualDeclaration
to true - declare queues manually
- Drop the connection and wait for the connection to re-established
Expected behavior
RabbitAdmin should re-declare the manual declarables even when no application context,