DefaultMessageListenerContainer should not been autoconfigured with CachingConnectionFactory #39816
Labels
for: team-meeting
An issue we'd like to discuss as a team to make progress
status: waiting-for-internal-feedback
An issue that needs input from a member or another Spring Team
status: waiting-for-triage
An issue we've not yet triaged
artemis 2.19 / spring boot 2.7.8
I searched why a native broker connection does not recover fast after restarting broker, but takes 10 min to recover.
I found
spring.jms.cache.enable=false solves the problem
switching it off by property is no option since I use JMS template in same component.
Javadoc writes:
Note: Don't use Spring's CachingConnectionFactory in combination with dynamic scaling. Ideally, don't use it with a message listener container at all, since it is generally preferable to let the listener container itself handle appropriate caching within its lifecycle. Also, stopping and restarting a listener container will only work with an independent, locally cached Connection - not with an externally cached one.
I assume autoconfiguration shoud use unwrapped connection factory for listener container.
The text was updated successfully, but these errors were encountered: