Skip to content

After recovery: RabbitAdmin manual declarabes are not being declared #2428

Closed
@EldarErel

Description

@EldarErel

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

  1. Create a connection to a RabbitMQ broker
  2. initialize RabbitAdmin instance (new RabbitAdmin(connection))
  3. set reDaclareManualDeclaration to true
  4. declare queues manually
  5. 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,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions