spring-framework / org.springframework.jms.connection / CachingConnectionFactory / setCacheConsumers

setCacheConsumers

open fun setCacheConsumers(cacheConsumers: Boolean): Unit

Specify whether to cache JMS MessageConsumers per JMS Session instance (more specifically: one MessageConsumer per Destination, selector String and Session). Note that durable subscribers will only be cached until logical closing of the Session handle.

Default is "true". Switch this to "false" in order to always recreate MessageConsumers on demand.