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-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2233,10 +2233,10 @@ This is best described using an example:
2233
2233
[source, java]
2234
2234
----
2235
2235
@RabbitListener(id="multi", queues = "someQueue")
2236
+
@SendTo("my.reply.queue")
2236
2237
public class MultiListenerBean {
2237
2238
2238
2239
@RabbitHandler
2239
-
@SendTo("my.reply.queue")
2240
2240
public String bar(Bar bar) {
2241
2241
...
2242
2242
}
@@ -2251,6 +2251,11 @@ public class MultiListenerBean {
2251
2251
...
2252
2252
}
2253
2253
2254
+
@RabbitHandler(isDefault = true)
2255
+
public String defaultMethod(Object object) {
2256
+
...
2257
+
}
2258
+
2254
2259
}
2255
2260
----
2256
2261
@@ -2259,7 +2264,9 @@ It is important to understand that the system must be able to identify a unique
2259
2264
The type is checked for assignability to a single parameter that has no annotations, or is annotated with the `@Payload` annotation.
2260
2265
Notice that the same method signatures apply as discussed in the method-level `@RabbitListener` described above.
2261
2266
2262
-
Notice that the `@SendTo` must be specified on each method (if needed); it is not supported at the class level.
2267
+
Starting with _version 2.0.3_, a `@RabbitHandler` method can be designated as the default method which is invoked if there is no match on other methods.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -143,6 +143,9 @@ You can now set the `autoStartup` property of the listener container at the anno
143
143
144
144
See <<async-annotation-driven>> for more information.
145
145
146
+
Starting with _version 2.0.3_, one of the `@RabbitHandler` s on a class-level `@RabbitListener` can be designated as the default.
147
+
See <<annotation-method-selection>> for more information.
148
+
146
149
===== Container Conditional Rollback
147
150
148
151
When using an external transaction manager (e.g. JDBC), rule-based rollback is now supported when providing the container with a transaction attribute.
0 commit comments