[jboss-cvs] JBoss Messaging SVN: r6793 - in trunk: docs/user-manual/en/modules and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 14 10:05:03 EDT 2009


Author: jmesnil
Date: 2009-05-14 10:05:03 -0400 (Thu, 14 May 2009)
New Revision: 6793

Removed:
   trunk/docs/user-manual/en/modules/consumer-buffering.xml
Modified:
   trunk/docs/user-manual/en/master.xml
   trunk/docs/user-manual/en/modules/flow-control.xml
   trunk/examples/jms/no-consumer-buffering/readme.html
Log:
user manual

* merged consumer buffering chapter into flow control chapter

Modified: trunk/docs/user-manual/en/master.xml
===================================================================
--- trunk/docs/user-manual/en/master.xml	2009-05-14 12:55:32 UTC (rev 6792)
+++ trunk/docs/user-manual/en/master.xml	2009-05-14 14:05:03 UTC (rev 6793)
@@ -27,7 +27,6 @@
         <!ENTITY intercepting-operations SYSTEM "modules/intercepting-operations.xml">
         <!ENTITY last-value-queues SYSTEM "modules/last-value-queues.xml">
         <!ENTITY message-grouping SYSTEM "modules/message-grouping.xml">
-        <!ENTITY consumer-buffering SYSTEM "modules/consumer-buffering.xml">
         <!ENTITY pre-acknowledge SYSTEM "modules/pre-acknowledge.xml">
         <!ENTITY client-reconnection SYSTEM "modules/client-reconnection.xml">
         <!ENTITY server-discovery SYSTEM "modules/server-discovery.xml">
@@ -77,7 +76,6 @@
    &intercepting-operations;
    &last-value-queues;
    &message-grouping;
-   &consumer-buffering;
    &pre-acknowledge;
    &client-reconnection;
    &server-discovery;

Deleted: trunk/docs/user-manual/en/modules/consumer-buffering.xml
===================================================================
--- trunk/docs/user-manual/en/modules/consumer-buffering.xml	2009-05-14 12:55:32 UTC (rev 6792)
+++ trunk/docs/user-manual/en/modules/consumer-buffering.xml	2009-05-14 14:05:03 UTC (rev 6793)
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="consumer-buffering">
-   <title>Consumer Buffering</title>
-   <para>By default, JBoss Messaging consumers buffer messages from the server 
-      in a client side buffer before the client receive them.       
-      This improves performance: otherwise every time the client called <literal>receive()</literal>
-      or processed the last message in a <literal>MessageListener</literal>, JBoss Messaging would 
-      have to go the server to request the next message. In turn, this message would then get sent 
-      to the client side, if one was available.</para>
-    <para>A network round trip would be involved for <emphasis>every</emphasis> message and 
-    considerably reduce performance.</para>
-    <para>To prevent this, JBoss Messaging pre-fetches messages into a buffer on each consumer.
-       The total maximum size of messages (in bytes) that will be buffered on each consumer is 
-       determined by the <literal>consumer-window-size</literal> parameter on the connection factory
-       setting in <literal>jbm-jms.xml</literal>:</para>
-    <programlisting>
-&lt;connection-factory name="ConnectionFactory"&gt;
-   &lt;connector-ref connector-name="netty-connector"/&gt;
-   &lt;entries&gt;
-      &lt;entry name="ConnectionFactory"/&gt;       
-   &lt;/entries&gt;
-
-   &lt;!-- Set the consumer window size to 0 to have *no* buffer on the client side --&gt;
-   &lt;consumer-window-size&gt;0&lt;/consumer-window-size&gt;
-&lt;/connection-factory&gt;
-    </programlisting>
-    <para>By default, the <literal>consumer-window-size</literal> is set to 1 Mib (1024 * 1024 bytes).</para>
-    
-    <para>Setting the consumer window size can considerably improve performance depending
-       on the messaging use case. As an example, let's consider the two extremes:
-    </para>
-    <itemizedlist>
-      <listitem><para><emphasis>Fast consumers</emphasis> can process messages as fast as they
-      consume them (or even faster)</para></listitem>
-      <listitem><para><emphasis>Slow consumers</emphasis> takes significant time to process each
-      message and it is desirable to prevent buffering messages on the client side so that they
-      can be delivered to another consumer instead
-      </para></listitem>
-    </itemizedlist>
-    <para>Most of the consumers can not be clearly identified as fast or slow consumers but are in-between.
-       In that case, setting the value of <literal>consumer-window-size</literal> to optimize performance
-       depends on the messaging use case and requires benchmarks to find the optimal value.</para>
-    
-    <section>
-        <title>Fast consumers</title>
-        <para>To allow fast consumers, set the <literal>consumer-window-size</literal> to -1.
-        This will allow <emphasis>unbounded</emphasis> message buffering on the client side.</para>
-        <para>Use this setting with caution: it can overflow the client memory if the consumer
-           is not able to process messages as fast as it receives them.</para>
-    </section>
-    <section>
-        <title>Slow consumers</title>
-        <para>To allow slow consumers, set the <literal>consumer-window-size</literal> to 0 (for no buffer at all).
-        This will prevent from buffering messages on the client side. Messages will remain on the server side
-        ready to be consumed by other consumers.</para>
-    </section>
-    <section>
-       <title>Example</title>
-       <para>The <ulink url="../../../../examples/jms/no-consumer-buffering/readme.html"><literal>no-consumer-buffering</literal> example</ulink> shows
-          how to configure JBoss Messaging to prevent consumer buffering when dealing with slow
-          consumers.</para>
-    </section>
-</chapter>

Modified: trunk/docs/user-manual/en/modules/flow-control.xml
===================================================================
--- trunk/docs/user-manual/en/modules/flow-control.xml	2009-05-14 12:55:32 UTC (rev 6792)
+++ trunk/docs/user-manual/en/modules/flow-control.xml	2009-05-14 14:05:03 UTC (rev 6793)
@@ -1,34 +1,122 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <chapter id="flow-control">
-    <title>Flow Control</title>
-    <para>blah</para>
-    <section>
-        <title>Consumer flow control</title>
-        <para></para>
-        <section>
-            <title>Window based flow control</title>
-            <para></para>
-        </section>
-        <section>
-            <title>Rate limited flow control</title>
-            <para></para>
-        </section>
-    </section>
-    
-    <section>
-        <title>Producer flow control</title>
-        <para></para>
-        
-        <section>
-            <title>Window based flow control</title>
-            <para></para>
-        </section>
-        
-        <section>
-            <title>Rate limited flow control</title>
-            <para></para>
-        </section>
-        
-    </section>
+   <title>Flow Control</title>
+   <para>blah</para>
+   <section>
+      <title>Consumer Flow Control</title>
+      <para>Consumer flow can be controlled using window size or rate.</para>
+      <section id="flow-control.consumer.window">
+         <title>Window-Based Flow Control</title>
+         <para>By default, JBoss Messaging consumers buffer messages from the server 
+            in a client side buffer before the client receive them.       
+            This improves performance: otherwise every time the client consumes a message,
+            JBoss Messaging would 
+            have to go the server to request the next message. In turn, this message would then get sent 
+            to the client side, if one was available.</para>
+         <para>A network round trip would be involved for <emphasis>every</emphasis> message and 
+            considerably reduce performance.</para>
+         <para>To prevent this, JBoss Messaging pre-fetches messages into a buffer on each consumer.
+            The total maximum size of messages (in bytes) that will be buffered on each consumer is 
+            determined by the <literal>consumer-window-size</literal> parameter.</para>
+         <para>By default, the <literal>consumer-window-size</literal> is set to 1 MiB (1024 * 1024 bytes).</para>
+         <para>The value can be:</para>
+         <itemizedlist>
+            <listitem><para><literal>-1</literal> for an <emphasis>unbounded</emphasis> buffer</para></listitem>
+            <listitem><para><literal>0</literal> for <emphasis>no</emphasis> buffer at all</para></listitem>
+            <listitem><para><literal>1</literal> for a buffer of <emphasis>1</emphasis> message</para></listitem>
+            <listitem><para><literal>&gt;1</literal> for a buffer with the given maximum size</para></listitem>
+         </itemizedlist>
+         
+         <para>Setting the consumer window size can considerably improve performance depending
+            on the messaging use case. As an example, let's consider the two extremes:
+         </para>
+         <variablelist>  
+            <varlistentry>
+               <term>Fast consumers</term>
+               <listitem>
+                  <para>Fast consumers can process messages as fast as they
+                     consume them (or even faster)</para>
+                  <para>To allow fast consumers, set the <literal>consumer-window-size</literal> to -1.
+                     This will allow <emphasis>unbounded</emphasis> message buffering on the client side.</para>
+                  <para>Use this setting with caution: it can overflow the client memory if the consumer
+                     is not able to process messages as fast as it receives them.</para>
+               </listitem>
+            </varlistentry>
+            <varlistentry>
+               <term>Slow consumers</term>
+               <listitem>
+                  <para>Slow consumers takes significant time to process each
+                     message and it is desirable to prevent buffering messages on the client side so that they
+                     can be delivered to another consumer instead</para>
+                  <para>To allow slow consumers, set the <literal>consumer-window-size</literal> to 0 (for no buffer at all)
+                     or 1 (to buffer only 1 message).
+                     This will prevent from buffering many messages on the client side. Messages will remain on the server side
+                     ready to be consumed by other consumers.</para>
+               </listitem>
+            </varlistentry>
+         </variablelist>
+
+         <para>Most of the consumers can not be clearly identified as fast or slow consumers but are in-between.
+            In that case, setting the value of <literal>consumer-window-size</literal> to optimize performance
+            depends on the messaging use case and requires benchmarks to find the optimal value.
+         </para>
+         
+         <section>
+            <title>Using Core API</title>
+            <para>If JBoss Messaging Core API is used, the consumer window size is specified
+               by <literal>ClientSessionFactory.setConsumerWindowSize()</literal>
+               method.</para>
+         </section>
+         
+         <section>
+            <title>Using JMS</title>
+            <para>if JNDI is used to look up the connection factory, the consumer window size is
+            configured in <literal>jbm-jms.xml</literal>:</para>
+            <programlisting>
+&lt;connection-factory name="ConnectionFactory"&gt;
+   &lt;connector-ref connector-name="netty-connector"/&gt;
+   &lt;entries&gt;
+      &lt;entry name="ConnectionFactory"/&gt;       
+   &lt;/entries&gt;
+      
+   &lt;!-- Set the consumer window size to 0 to have *no* buffer on the client side --&gt;
+   &lt;consumer-window-size&gt;0&lt;/consumer-window-size&gt;
+&lt;/connection-factory&gt;
+            </programlisting>
+            <para>If the connection factory is directly instantiated, the consumer window size
+               is specified by <literal>JBossConnectionFactory.setConsumerWindowSize()</literal>
+               method.</para>
+         </section>
+         
+         <section>
+            <title>Example</title>
+            <para>The <ulink url="../../../../examples/jms/no-consumer-buffering/readme.html">
+               <literal>no-consumer-buffering</literal> example</ulink> shows
+               how to configure JBoss Messaging to prevent consumer buffering when dealing with slow
+               consumers.</para>
+         </section>
+      </section>
+      
+      <section>
+          <title>Rate limited flow control</title>
+          <para></para>
+      </section>
+   </section>
    
+   <section>
+       <title>Producer flow control</title>
+       <para></para>
+       
+       <section>
+           <title>Window based flow control</title>
+           <para></para>
+       </section>
+       
+       <section>
+           <title>Rate limited flow control</title>
+           <para></para>
+       </section>
+       
+   </section>
+   
 </chapter>

Modified: trunk/examples/jms/no-consumer-buffering/readme.html
===================================================================
--- trunk/examples/jms/no-consumer-buffering/readme.html	2009-05-14 12:55:32 UTC (rev 6792)
+++ trunk/examples/jms/no-consumer-buffering/readme.html	2009-05-14 14:05:03 UTC (rev 6793)
@@ -177,7 +177,7 @@
      <h2>More information</h2>
      
      <ul>
-         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#consumer-buffering">Consumer Buffering chapter</a></li>
+         <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#flow-control.consumer.window">Consumer Window-Based Flow Control chapter</a></li>
      </ul>
 
   </body>




More information about the jboss-cvs-commits mailing list