From c06a184615fe925f71c43be590669c61614e75b9 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Fri, 6 Mar 2015 15:42:23 +0000 Subject: QPID-6434: [Java Client Docs] Correct a couple typos and simplify detail. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1664663 13f79535-47bb-0310-9956-ffa450edef68 --- .../jms-client-0-8/JMS-Client-Understanding.xml | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml b/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml index fdef79c22c..60af03476e 100644 --- a/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml +++ b/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml @@ -334,24 +334,20 @@ amqp://guest:guest@clientid/?brokerlist='localhost:5671?key_store='/path/to/app1 switches off the pre-fetching functionality. With maxprefetch=0 messages are fetched one by one without caching on the client. - - Setting maxprefetch to 0 is recommended in sping-jms-based applications when - DefaultMassgeListenerContainer is configured with CachingConnectionFactory - and has cacheLevel set to either CACHE_CONSUMER or CACHE_SESSION - and dynamic consumer scaling (concurrentConsumers!=maxConcurrentConsumers). With such configuration - DefaultMassgeListenerContainer can create new MessageConsumer - invokers and delete existing MessageConsumer invokers dynamically. On deletion of - MessageConsumer invoker, its JMS Session and MessageConsumer - are closed. However, with CachingConnectionFactory JMS Session - proxy objects are used and when method close of session proxy is invoked, the real Qpid - JMS Session object is not get closed. It can be returned into the session cache in active state. - If maxprefetch is not 0, the cached Qpid Session might have prefetched messages and - it even might continue prefetching of the messages until its prefetch limit is reached. As result, - because of prefetched messages being stack in not used cached Session, - the message flow between client and broker can stop making an impression as if message consumption is hang. - Setting maxprefetch to 0 prevents this problem from occurring. - SingleConnectionFactory should be used with maxprefetch>0. - + Setting maxprefetch to 0 is recommended in Spring-JMS based applications whenever + DefaultMassgeListenerContainer is configured with a + CachingConnectionFactory that has cacheLevel + set to either CACHE_CONSUMER or CACHE_SESSION. + In these configurations the Qpid JMS Session objects remain open in + Spring's dynamically scaled pools. If maxprefetch is not 0, any prefetched messages held + by the Session and any new ones subsequently sent to it (in the + background until prefetch is reached) will be effectively by 'stuck' (unavailable to the + application) until Spring decides to utilise the cached Session again. This can give the + impression that message delivery has stopped even though messages remain of the queue. + Setting maxprefetch to 0 prevents this problem from occurring. + If using maxprefetch > 0 SingleConnectionFactory must be + used. SingleConnectionFactory does not have the same session/consumer caching behaviour so + does not exhibit the same problem.
-- cgit v1.2.1