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 https://jira.spring.io/browse/INT-2086
Some JMS vendors handle differently a `TemporaryTopic` and `TemporaryQueue`,
so, change a `JmsOutboundGateway` to create respective temporary destination
according the `replyPubSubDomain` option set
Copy file name to clipboardExpand all lines: src/reference/asciidoc/jms.adoc
+6-2
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,9 @@ Prior to Spring Integration 2.2, if necessary, a `TemporaryQueue` was created (a
44
44
Beginning with Spring Integration 2.2, you can configure the outbound gateway to use a `MessageListener` container to receive replies instead of directly using a new (or cached) `Consumer` to receive the reply for each request.
45
45
When so configured, and no explicit reply destination is provided, a single `TemporaryQueue` is used for each gateway instead of one for each request.
46
46
47
+
Starting with version 6.0, the outbound gateway creates a `TemporaryTopic` instead of `TemporaryQueue` if `replyPubSubDomain` option is set to `true`.
48
+
Some JMS vendors handle these destinations differently.
49
+
47
50
[[jms-inbound-channel-adapter]]
48
51
=== Inbound Channel Adapter
49
52
@@ -412,13 +415,13 @@ To revert to the previous behavior, set the `shutdownContainerOnStop` on the `Jm
412
415
=== Outbound Gateway
413
416
414
417
The outbound gateway creates JMS messages from Spring Integration messages and sends them to a 'request-destination'.
415
-
It then handles the JMS reply message either by using a selector to receive from the 'reply-destination' that you configure or, if no 'reply-destination' is provided, by creating JMS `TemporaryQueue` instances.
418
+
It then handles the JMS reply message either by using a selector to receive from the 'reply-destination' that you configure or, if no 'reply-destination' is provided, by creating JMS `TemporaryQueue` (or `TemporaryTopic` if `replyPubSubDomain= true`) instances.
416
419
417
420
[[jms-outbound-gateway-memory-caution]]
418
421
[CAUTION]
419
422
=====
420
423
Using a `reply-destination` (or `reply-destination-name`) together with a `CachingConnectionFactory` that has cacheConsumers set to `true` can cause out-of-memory conditions.
421
-
This is because each request gets a new consumer with a new selector (selecting on the `correlation-key` value or, when there is no `correlation-key`, on the sent JMSMessageID).
424
+
This is because each request gets a new consumer with a new selector (selecting on the `correlation-key` value or when there is no `correlation-key`, on the sent JMSMessageID).
422
425
Given that these selectors are unique, they remain in the cache (unused) after the current request completes.
423
426
424
427
If you specify a reply destination, you are advised to not use cached consumers.
@@ -450,6 +453,7 @@ This provides a number of performance benefits as well as alleviating the cached
450
453
451
454
When using a `<reply-listener/>` with an outbound gateway that has no `reply-destination`, instead of creating a `TemporaryQueue` for each request, a single `TemporaryQueue` is used.
452
455
(The gateway creates an additional `TemporaryQueue`, as necessary, if the connection to the broker is lost and recovered).
456
+
If `replyPubSubDomain` is set to `true`, starting with version 6.0, a `TemporaryTopic` is created instead.
453
457
454
458
When using a `correlation-key`, multiple gateways can share the same reply destination, because the listener container uses a selector that is unique to each gateway.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+6
Original file line number
Diff line number
Diff line change
@@ -129,3 +129,9 @@ See <<./jdbc.adoc#jdbc-lock-registry,JDBC Lock Registry>> for more information.
129
129
The `lookupHost` property of the `AbstractConnectionFactory` and `DatagramPacketMessageMapper` is now set to `false` by default to avoid delays in the environments where DNS is not configured.
130
130
131
131
See <<./ip.adoc#ip,TCP and UDP Support>> for more information.
132
+
133
+
=== JMS Changes
134
+
135
+
The `JmsOutboundGateway` now creates a `TemporaryTopic` instead of `TemporaryQueue` if `replyPubSubDomain` option is set to `true`.
136
+
137
+
See <<./jms.adoc#jms,JMS Support>> for more information.
0 commit comments