spring-projects/spring-framework — pull request #581 by cshannon (2014-07-05 20:11:32+00:00)
Title: Adding cacheSharedConsumers configuration for CachingConnectionFactory

The main issue is that the JMS 2.0 spec supports multiple shared consumers on a subscription, unlike JMS 1.1 which only supports one consumer.

The use case is that I might want to cache non-shared consumers, but not cache shared consumers and vice versa. Currently both types are configured with the same boolean flag. With shared consumers it is possible to create multiple of them in the same JVM and same connection.. In this use case, it would actually be useful to not cache the shared consumers. The idea here would be to allow multiple threads to have their own shared consumer to make processing multi-threaded. The reason to add this behavior to the CachingConnectionFactory itself is to allow the benefits of caching of other producers/consumers to be re-used with the same factory. Therefore I split up the configuration of caching of consumers and shared consumers so either type can be configured separately.

Issue: SPR-11958

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.