By default, only one Channel will be cached, with further requested Channels being created and disposed on demand. Consider raising the {@link #setChannelCacheSize(int) "channelCacheSize" value} in case of a high-concurrencyenvironment.
When the cache mode is {@link CacheMode#CONNECTION}, a new (or cached) connection is used for each request. In this case, no channels are cached, just connections. The intended use case is a dedicated connection for long-lived channels, such as those used in listener container threads. In those cases, the channel must be closed anyway in order to re-queue any un-acked messages.
{@link CacheMode#CONNECTION} is not compatible with a Rabbit Admin that auto-declares queues etc.
NOTE: This ConnectionFactory requires explicit closing of all Channels obtained form its shared Connection. This is the usual recommendation for native Rabbit access code anyway. However, with this ConnectionFactory, its use is mandatory in order to actually allow for Channel reuse. @author Mark Pollack @author Mark Fisher @author Dave Syer @author Gary Russell @author Artem Bilan
By default, only one single Session will be cached, with further requested Sessions being created and disposed on demand. Consider raising the {@link #setSessionCacheSize "sessionCacheSize" value} in case of ahigh-concurrency environment.
NOTE: This ConnectionFactory decorator requires JMS 1.1 or higher. For JMS 1.0.2, consider using {@link SingleConnectionFactory102} instead. @author Juergen Hoeller @since 2.5.3
|
|