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
JIRA: https://jira.spring.io/browse/INT-4385
It is slightly unclear for end-users that `<jms:listener-container/>`
is just a syntax sugar and the real JMS container is created by the
`<jms:listener>` sub-element
* Add a NOTE to the `jms.adoc` to explain such a confuse and what and
how is going to happen if the intention to use a `<jms:listener-container/>`
for Spring Integration channel adapters.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/jms.adoc
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,6 +126,17 @@ If you have a custom listener container implementation (usually a subclass of `D
126
126
In that case, the attributes on the adapter are transferred to an instance of your custom container.
127
127
=====
128
128
129
+
[NOTE]
130
+
=====
131
+
You can't use the Spring JMS namespace element `<jms:listener-container/>` to configure a container reference for the `<int-jms:message-driven-channel-adapter>` since that element doesn't actually reference a container.
132
+
Each `<jms:listener/>` sub-element gets its own `DefaultMessageListenerContainer` (with shared attributes defined on the parent `<jms:listener-container/>` element).
133
+
You can give each listener sub-element an `id`, and use that to inject into the channel adapter, however, the `<jms:/>` namespace requires a real listener.
134
+
Since, for Spring Integration, the adapter itself needs to configure the listener, the configured listener will be overwritten.
135
+
If you go this route, you will see a warning for each adapter.
136
+
137
+
It is recommended to configure a regular `<bean>` for the `DefaultMessageListenerContainer` and use it as a reference in the channel adapter.
138
+
=====
139
+
129
140
IMPORTANT: Starting with version 4.2, the default `acknowledge` mode is `transacted`, unless you provide an external
130
141
container.
131
142
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
0 commit comments