Closed
Description
In what version(s) of Spring AMQP are you seeing this issue?
2.4.7
Describe the bug
The message listener container, when restarted because of a consumer's failure, attempts to redeclare the queues. The code doing that - however - does not take into account queues that are declared using a bean of type Declarables.
To Reproduce
- Declare a Queue using a Declarables bean
- Declare a consumer on that queue
- While the application is running, delete the queue
- The consumer fails, attempts to restart and redeclare missing queues, but our queue is not redeclared (if the queue was instead declared as a bean of type Queue, the redeclaration would succeed).
Expected behavior
The consumer should redeclare also queues provided through beans of type Declarables.
Example
Here you can find 2 tests:
- QueueRedeclarationTest ==> succeeds showing that deleted queues are redeclared, if they are provided as Queue bean
- DeclarablesRedeclarationTest ==> fails showing that the same test described above fails if queues are declared using Declarables
https://github.com/mirkoluchi/springboot-rabbitmq-issue-2432