Skip to content

Commit 27f3e54

Browse files
committed
GH-1541: Fix Container Docs
Resolves #1541 Containers can have zero queues.
1 parent e8f15cc commit 27f3e54

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/reference/asciidoc/amqp.adoc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6629,15 +6629,12 @@ When using exclusive consumers, other containers try to consume from the queues
66296629

66306630
Version 1.3 introduced a number of improvements for handling multiple queues in a listener container.
66316631

6632-
The container must be configured to listen on at least one queue.
6633-
This was the case previously, too, but now queues can be added and removed at runtime.
6634-
The container recycles (cancels and re-creates) the consumers when any pre-fetched messages have been processed.
6632+
Container can be initially configured to listen on zero queues.
6633+
Queues can be added and removed at runtime.
6634+
The `SimpleMessageListenerContainer` recycles (cancels and re-creates) all consumers when any pre-fetched messages have been processed.
6635+
The `DirectMessageListenerContainer` creates/cancels individual consumer(s) for each queue without affecting consumers on other queues.
66356636
See the https://docs.spring.io/spring-amqp/docs/latest-ga/api/org/springframework/amqp/rabbit/listener/AbstractMessageListenerContainer.html[Javadoc] for the `addQueues`, `addQueueNames`, `removeQueues` and `removeQueueNames` methods.
6636-
When removing queues, at least one queue must remain.
66376637

6638-
A consumer now starts if any of its queues are available.
6639-
Previously, the container would stop if any queues were unavailable.
6640-
Now, this is only the case if none of the queues are available.
66416638
If not all queues are available, the container tries to passively declare (and consume from) the missing queues every 60 seconds.
66426639

66436640
Also, if a consumer receives a cancel from the broker (for example, if a queue is deleted) the consumer tries to recover, and the recovered consumer continues to process messages from any other configured queues.

0 commit comments

Comments
 (0)