Readme says:
That’s why we recommend that you use a listener container such as DefaultMessageListenerContainer with a cache-based connection factory
This statement is fulfilled by AbstractJmsListenerContainerFactory#createListenerContainer
- on debug I see CachingConnectionFactory is passed in line 190.
On the other hand, javadoc https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/jms/listener/DefaultMessageListenerContainer.html says:
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'm confused: Should CachingConnectionFactory be used or not?