You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2015/03/06 12:39:14 UTC

svn commit: r1664592 - /qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml

Author: orudyy
Date: Fri Mar  6 11:39:14 2015
New Revision: 1664592

URL: http://svn.apache.org/r1664592
Log:
QPID-6434: [Java Client] Update existing JMS client documentation for AMQP 0.8/0.9.x to cover the effect of setting maxprefetch to 0

Modified:
    qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml

Modified: qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml?rev=1664592&r1=1664591&r2=1664592&view=diff
==============================================================================
--- qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml (original)
+++ qpid/trunk/qpid/doc/book/src/jms-client-0-8/JMS-Client-Understanding.xml Fri Mar  6 11:39:14 2015
@@ -326,6 +326,33 @@ amqp://guest:guest@clientid/?brokerlist=
             <emphasis>Session#SESSION_TRANSACTED</emphasis> ) or received messages are acknowledged
           (for <emphasis>Session#CLIENT_ACKNOWLEDGE</emphasis>).</para>
       </note>
+      <para>
+          Settings maxprefetch to 0 ( either globally via JVM system property
+          <link linkend="JMS-Client-0-8-System-Properties-Maxprefetch" ><literal>max_prefetch</literal></link>
+          or on a connection level as a connection option
+          <link linkend="JMS-Client-0-8-Connection-URL-ConnectionOptions-Maxprefetch"><literal>maxprefetch</literal></link> )
+          switches off the pre-fetching functionality. With maxprefetch=0 messages are fetched one by one without caching on the client.
+      </para>
+      <note>
+          <para>
+              Setting maxprefetch to 0 is recommended in sping-jms-based applications when
+              <emphasis>DefaultMassgeListenerContainer</emphasis> is configured with <emphasis>CachingConnectionFactory</emphasis>
+              and has <emphasis>cacheLevel</emphasis> set to either <emphasis>CACHE_CONSUMER</emphasis> or <emphasis>CACHE_SESSION</emphasis>
+              and dynamic consumer  scaling (concurrentConsumers!=maxConcurrentConsumers). With such configuration
+              <emphasis>DefaultMassgeListenerContainer</emphasis> can create new <emphasis>MessageConsumer</emphasis>
+              invokers and delete existing <emphasis>MessageConsumer</emphasis> invokers dynamically. On deletion of
+              <emphasis>MessageConsumer</emphasis> invoker, its JMS <emphasis>Session</emphasis> and <emphasis>MessageConsumer</emphasis>
+              are closed. However, with <emphasis>CachingConnectionFactory</emphasis> JMS <emphasis>Session</emphasis>
+              proxy objects are used and when method <emphasis>close</emphasis> of session proxy is invoked, the real Qpid
+              JMS <emphasis>Session</emphasis> object is not get closed. It can be returned into the session cache in active state.
+              If maxprefetch is not 0, the cached Qpid <emphasis>Session</emphasis> 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 <emphasis>Session</emphasis>,
+              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.
+              <emphasis>SingleConnectionFactory</emphasis> should be used with maxprefetch>0.
+          </para>
+      </note>
     </section>
     <section id="JMS-Client-0-8-Client-Understanding-Session-TemporaryQueues">
       <title>TemporaryQueues</title>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org