Files
Gary Russell 5c52abbb50 GH-923: Fix start delay for @Lazy @RabbitListener
Fixes https://github.com/spring-projects/spring-amqp/issues/923

While checking for missing or mis-matched queues, a lazily-loaded
listener container can deadlock for 60 seconds.

This occurs if the `allBeanNamesByType` cache does not currently have
an entry for `Queue` (e.g. cleared by registering a singleton).
When lazy beans are referenced, the `RabbitListenerEndpointRegistry`
starts the container and `start()` waits for the consumers to start.
Getting a reference to the lazy bean holds the `singletonObjects`
lock, which is required by the consumer(s) to get the `Queue` beans
to check.

Add a test case to demonstrate the issue.

Disable the redeclaration logic during the initial start of such a
container.

**cherry-pick to 2.1.x**
2019-12-05 17:00:10 -05:00
..
2019-03-26 12:55:51 -04:00

= spring-rabbit

This project provides the RabbitMQ implementation for the abstractions in `spring-amqp`.

Many of the integration tests here require a running RabbitMQ server - they
will be skipped if the broker is not detected.

If RabbitMQ is not installed on your system, refer to the instructions for your
particular OS here: [https://www.rabbitmq.com/install.html]

Start the server. For example, and a *nix-based system where RabbitMQ has been
installed within `/opt/rabbitmq`, issue the following command:

    > sudo /opt/rabbitmq/sbin/rabbitmq-server start