File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
spring-jms/src/main/java/org/springframework/jms/listener Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 98
98
* number of 1 consumer, otherwise you'd receive the same message multiple times on
99
99
* the same node.
100
100
*
101
- * <p><b>Note: Don't use Spring's {@link org.springframework.jms.connection.CachingConnectionFactory}
102
- * in combination with dynamic scaling.</b> Ideally, don't use it with a message
103
- * listener container at all, since it is generally preferable to let the
104
- * listener container itself handle appropriate caching within its lifecycle.
105
- * Also, stopping and restarting a listener container will only work with an
106
- * independent, locally cached Connection - not with an externally cached one.
101
+ * <p><b>Note: You may use {@link org.springframework.jms.connection.CachingConnectionFactory}
102
+ * with a listener container but it comes with limitations.</b> It is generally preferable
103
+ * to let the listener container itself handle appropriate caching within its lifecycle.
104
+ * Also, stopping and restarting a listener container will only work with an independent,
105
+ * locally cached {@code Connection}, not with an externally cached one. Last but not least,
106
+ * with {@code CachingConnectionFactory}, dynamic scaling with custom provider hints such as
107
+ * {@link #setMaxMessagesPerTask "maxMessagesPerTask"} can result in JMS messages delivered
108
+ * to cached consumers even when they are no longer attached to the listener container.
107
109
*
108
110
* <p><b>It is strongly recommended to either set {@link #setSessionTransacted
109
111
* "sessionTransacted"} to "true" or specify an external {@link #setTransactionManager
You can’t perform that action at this time.
0 commit comments