spring-projects/spring-amqp — pull request #163 by garyrussell (2014-02-08 15:01:33+00:00)
Title: AMQP-373 Support Listen on auto-delete Queues

JIRA: https://jira.springsource.org/browse/AMQP-373

Previously, listening on auto-delete queues was impractical
if the container is stopped/started. Stopping the container
causes the consumer to be cancelled, deleting the queue.

The RabbitAdmin only redeclares beans in the context when
the connection is lost. When stopping the container, the
connection is not closed.

Add code to the listener consumer startup to check if any
of it's queue names are declared in the context as
auto-delete queues and check that the queue exists.

If not, declare such queues with a RabbitAdmin.