diff --git a/src/reference/asciidoc/jms.adoc b/src/reference/asciidoc/jms.adoc index 70fb8c2adf..39e4c98c37 100644 --- a/src/reference/asciidoc/jms.adoc +++ b/src/reference/asciidoc/jms.adoc @@ -126,6 +126,17 @@ If you have a custom listener container implementation (usually a subclass of `D In that case, the attributes on the adapter are transferred to an instance of your custom container. ===== +[NOTE] +===== +You can't use the Spring JMS namespace element `` to configure a container reference for the `` since that element doesn't actually reference a container. +Each `` sub-element gets its own `DefaultMessageListenerContainer` (with shared attributes defined on the parent `` element). +You can give each listener sub-element an `id`, and use that to inject into the channel adapter, however, the `` namespace requires a real listener. +Since, for Spring Integration, the adapter itself needs to configure the listener, the configured listener will be overwritten. +If you go this route, you will see a warning for each adapter. + +It is recommended to configure a regular `` for the `DefaultMessageListenerContainer` and use it as a reference in the channel adapter. +===== + IMPORTANT: Starting with version 4.2, the default `acknowledge` mode is `transacted`, unless you provide an external container. In that case, you should configure the container as needed. @@ -254,7 +265,7 @@ You can use the error-channel attribute to configure such a channel, as the foll [source,xml] ---- When you use a ``, its lifecycle (start and stop) matches that of the gateway by default. When this value is greater than `0`, the container is started on demand (when a request is sent). -The container continues to run until at least this time elapses with no requests being received (and until no replies -are outstanding). +The container continues to run until at least this time elapses with no requests being received (and until no replies are outstanding). The container is started again on the next request. The stop time is a minimum and may actually be up to 1.5x this value. <26> See <>. -<27> When this element is included, replies are received by an asynchronous `MessageListenerContainer` rather than -creating a consumer for each reply. +<27> When this element is included, replies are received by an asynchronous `MessageListenerContainer` rather than creating a consumer for each reply. This can be more efficient in many cases. ====