You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/reference/asciidoc/amqp.adoc
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ You can bind a queue to a `DirectExchange` with a fixed routing key, as the foll
151
151
====
152
152
[source,java]
153
153
----
154
-
new Binding(someQueue, someDirectExchange, "foo.bar")
154
+
new Binding(someQueue, someDirectExchange, "foo.bar");
155
155
----
156
156
====
157
157
@@ -160,7 +160,7 @@ You can bind a queue to a `TopicExchange` with a routing pattern, as the followi
160
160
====
161
161
[source,java]
162
162
----
163
-
new Binding(someQueue, someTopicExchange, "foo.*")
163
+
new Binding(someQueue, someTopicExchange, "foo.*");
164
164
----
165
165
====
166
166
@@ -169,7 +169,7 @@ You can bind a queue to a `FanoutExchange` with no routing key, as the following
169
169
====
170
170
[source,java]
171
171
----
172
-
new Binding(someQueue, someFanoutExchange)
172
+
new Binding(someQueue, someFanoutExchange);
173
173
----
174
174
====
175
175
@@ -844,6 +844,10 @@ Spring AMQP can still use its own recovery mechanisms if you wish, disabling it
844
844
However, the framework is completely compatible with auto-recovery being enabled.
845
845
This means any consumers you create within your code (perhaps via `RabbitTemplate.execute()`) can be recovered automatically.
846
846
847
+
IMPORTANT: Only elements (queues, exchanges, bindings) that are defined as beans will be re-declared after a connection failure.
848
+
Elements declared by invoking `RabbitAdmin.declare*()` methods directly from user code are unknown to the framework and therefore cannot be recovered.
849
+
If you have a need for a variable number of declarations, consider defining a bean, or beans, of type `Declarables`, as discussed in <<collection-declaration>>.
850
+
847
851
[[custom-client-props]]
848
852
==== Adding Custom Client Connection Properties
849
853
@@ -4212,8 +4216,8 @@ The `durable()` method with no parameter is no longer provided.
4212
4216
[[collection-declaration]]
4213
4217
===== Declaring Collections of Exchanges, Queues, and Bindings
4214
4218
4215
-
You can wrap collections of declarable objects (`Queue`, `Exchange`, and `Binding`) in `Declarables` objects.
4216
-
The `RabbitAdmin` detects such beans in the application context and declares the contained objects on the broker.
4219
+
You can wrap collections of `Declarable` objects (`Queue`, `Exchange`, and `Binding`) in `Declarables` objects.
4220
+
The `RabbitAdmin` detects such beans (as well as discrete `Declarable` beans) in the application context, and declares the contained objects on the broker whenever a connection is established (initially and after a connection failure).
0 commit comments