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
Fixes#712
For controlling `noLocal` flag for reply consumers in the `sendAndReceive()`
operations introduce a `noLocalReplyConsumer` option for the `RabbitTemplate`.
Make it `false` by default since it does not have any value in RabbitMQ,
but matters in QPid for temporary queues
Copy file name to clipboardExpand all lines: src/reference/asciidoc/amqp.adoc
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3077,13 +3077,15 @@ Similar request/reply methods are also available where the `MessageConverter` is
3077
3077
Those methods are named `convertSendAndReceive`.
3078
3078
See the Javadoc of `AmqpTemplate` for more detail.
3079
3079
3080
-
Starting with _version 1.5.0_, each of the `sendAndReceive` method variants has an overloaded version that takes `CorrelationData`.
3080
+
Starting with version 1.5.0, each of the `sendAndReceive` method variants has an overloaded version that takes `CorrelationData`.
3081
3081
Together with a properly configured connection factory, this enables the receipt of publisher confirms for the send side of the operation.
3082
3082
See <<template-confirms>> and the javadoc for `RabbitOperations` for more information.
3083
3083
3084
-
Starting with __version 2.0__, there are variants of these methods (`convertSendAndReceiveAsType`) that take an additional `ParameterizedTypeReference` argument to convert complex returned types.
3084
+
Starting with version 2.0, there are variants of these methods (`convertSendAndReceiveAsType`) that take an additional `ParameterizedTypeReference` argument to convert complex returned types.
3085
3085
The template must be configured with a `SmartMessageConverter`; see <<json-complex>> for more information.
3086
3086
3087
+
Starting with version 2.1, the `RabbitTemplate` can be configured with the `noLocalReplyConsumer` option to control a `noLocal` flag for reply consumers.
3088
+
This is `false` now by default.
3087
3089
3088
3090
[[reply-timeout]]
3089
3091
===== Reply Timeout
@@ -3103,26 +3105,26 @@ Also, you must not have registered your own `ReturnCallback` with the `RabbitTem
3103
3105
[[direct-reply-to]]
3104
3106
===== RabbitMQ Direct reply-to
3105
3107
3106
-
IMPORTANT: Starting with _version 3.4.0_, the RabbitMQ server now supports http://www.rabbitmq.com/direct-reply-to.html[Direct reply-to]; this eliminates the main reason for a fixed reply queue (to avoid the need to create a temporary queue for each request).
3108
+
IMPORTANT: Starting with version 3.4.0, the RabbitMQ server now supports http://www.rabbitmq.com/direct-reply-to.html[Direct reply-to]; this eliminates the main reason for a fixed reply queue (to avoid the need to create a temporary queue for each request).
3107
3109
Starting with *Spring AMQP version 1.4.1* Direct reply-to will be used by default (if supported by the server) instead of creating temporary reply queues.
3108
3110
When no `replyQueue` is provided (or it is set with the name `amq.rabbitmq.reply-to`), the `RabbitTemplate` will automatically detect whether Direct reply-to is supported and either use it or fall back to using a temporary reply queue.
3109
3111
When using Direct reply-to, a `reply-listener` is not required and should not be configured.
3110
3112
3111
3113
Reply listeners are still supported with named queues (other than `amq.rabbitmq.reply-to`), allowing control of reply concurrency etc.
3112
3114
3113
-
Starting with _version 1.6_ if, for some reason, you wish to use a temporary, exclusive, auto-delete queue for each
3115
+
Starting with version 1.6 if, for some reason, you wish to use a temporary, exclusive, auto-delete queue for each
3114
3116
reply, set the `useTemporaryReplyQueues` property to `true`.
3115
3117
This property is ignored if you you set a `replyAddress`.
3116
3118
3117
3119
The decision whether or not to use direct reply-to can be changed to use different criteria by subclassing
3118
3120
`RabbitTemplate` and overriding `useDirectReplyTo()`.
3119
3121
The method is called once only; when the first request is sent.
3120
3122
3121
-
With versions earlier than _verion 2.0_, the `RabbitTemplate` created a new consumer for each request and canceled the consumer when the reply was received (or timed out).
3123
+
With versions earlier than version 2.0, the `RabbitTemplate` created a new consumer for each request and canceled the consumer when the reply was received (or timed out).
3122
3124
Now, the template uses a `DirectReplyToMessageListenerContainer` instead, allowing the consumers to be reused; the template still takes care of correlating the replies so there is no danger of a late reply going to a different sender.
3123
3125
If you want to revert to the previous behavior, set property `useDirectReplyToContainer` (`direct-reply-to-container` when using XML configuration) to false.
3124
3126
3125
-
The `AsynRabbitTemplate` has no such option - it always used a `DirectReplyToContainer` for replies when direct replyTo is being used.
3127
+
The `AsyncRabbitTemplate` has no such option - it always used a `DirectReplyToContainer` for replies when direct replyTo is being used.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,15 @@ See <<template-confirms>> for more information.
31
31
The listener container factories can now be used to create any listener container, not just those for use with `@RabbitListener` s or the `@RabbitListenerEndpointRegistry`.
32
32
See <<using-container-factories>> for more information.
33
33
34
-
`ChannelAwareMessageListener` now inherits from `MesssageListener`.
34
+
`ChannelAwareMessageListener` now inherits from `MessageListener`.
35
35
36
36
===== RabbitAdmin Changes
37
37
38
38
The `RabbitAdmin` will discover of type `Declarables`, which is a container for `Declarable` (`Queue`, `Exchange`, `Binding`) objects, and declare the objects on the broker.
39
39
Users are discouraged from using the old mechanism of declaring `<Collection<Queue>>` etc and should use `Declarables` beans instead.
40
40
See <<collection-declaration>> for more information.
41
+
42
+
===== RabbitTemplate Changes
43
+
44
+
The `RabbitTemplate` now can be configured with the `noLocalReplyConsumer` option to control a `noLocal` flag for reply consumers in the `sendAndReceive()` operations.
0 commit comments