[jboss-cvs] JBoss Messaging SVN: r6887 - 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
Tue May 19 10:20:15 EDT 2009


Author: timfox
Date: 2009-05-19 10:20:15 -0400 (Tue, 19 May 2009)
New Revision: 6887

Added:
   trunk/docs/user-manual/en/modules/command-buffering.xml
Modified:
   trunk/docs/user-manual/en/master.xml
   trunk/docs/user-manual/en/modules/flow-control.xml
   trunk/examples/core/embedded/src/org/jboss/core/example/EmbeddedExample.java
Log:
command buffering

Modified: trunk/docs/user-manual/en/master.xml
===================================================================
--- trunk/docs/user-manual/en/master.xml	2009-05-19 14:07:17 UTC (rev 6886)
+++ trunk/docs/user-manual/en/master.xml	2009-05-19 14:20:15 UTC (rev 6887)
@@ -15,6 +15,7 @@
         <!ENTITY examples                SYSTEM "modules/examples.xml">
         <!ENTITY filter-expressions      SYSTEM "modules/filter-expressions.xml">
         <!ENTITY flow-control            SYSTEM "modules/flow-control.xml">
+        <!ENTITY command-buffering       SYSTEM "modules/command-buffering.xml">
         <!ENTITY ha                      SYSTEM "modules/ha.xml">
         <!ENTITY intercepting-operations SYSTEM "modules/intercepting-operations.xml">
         <!ENTITY interoperability        SYSTEM "modules/interoperability.xml">
@@ -74,6 +75,7 @@
    &scheduled-messages;
    &filter-expressions;
    &flow-control;
+   &command-buffering;
    &undelivered-messages;
    &message-expiry;
    &configuring-transports;

Added: trunk/docs/user-manual/en/modules/command-buffering.xml
===================================================================
--- trunk/docs/user-manual/en/modules/command-buffering.xml	                        (rev 0)
+++ trunk/docs/user-manual/en/modules/command-buffering.xml	2009-05-19 14:20:15 UTC (rev 6887)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="command-buffering">
+    <title>Command Buffering</title>
+    <para>As JBoss Messaging clients send commands to their servers they store each sent command in
+        an in-memory buffer. In the case that connection failure occurs and the client subsequently
+        reconnects to the same server or fails over onto a replica server, as part of the
+        reconnection protocol the server informs the client during reconnection with the id of the
+        last command it successfully received from that client.</para>
+    <para>If the client has sent more commands than were received befor failover it can replay any
+        sent commands from its buffer so that the client and server can reconcile their
+        states.</para>
+    <para>The size of this buffer is configured by the <literal>SendWindowSize</literal> parameter,
+        when the server has received <literal>SendWindowSize</literal> bytes of commands and
+        processed them it will send back a command confirmation to the client, and the client can
+        then free up space in the buffer.</para>
+    <para>If you are using JMS and you're using the JMS service on the server to load your JMS
+        connection factory instances into JNDI then this parameter can be configured in <literal
+            >jbm-jms.xml</literal> using the element <literal>send-window-size</literal> a. If
+        you're using JMS but not using JNDI then you can set these values directly on the <literal
+            >JBossConnectionFactory</literal> instance using the appropriate setter method.</para>
+    <para>If you're using core you can set these values directly on the <literal
+            >ClientSessionFactory</literal> instance using the appropriate setter method.</para>
+    <para>The send window is specified in bytes, and has a default value of <literal
+        >1MiB</literal>.</para>
+    <para>When the send buffer becomes full, any attempts to send more commands from the client will
+        block until the client receives a confirmation from the server and clears out the buffer.
+        Because of the blocking, the command buffer performs a type of <literal>flow
+            control</literal>, preventing the client from overwhelming the server with
+        commands.</para>
+</chapter>

Modified: trunk/docs/user-manual/en/modules/flow-control.xml
===================================================================
--- trunk/docs/user-manual/en/modules/flow-control.xml	2009-05-19 14:07:17 UTC (rev 6886)
+++ trunk/docs/user-manual/en/modules/flow-control.xml	2009-05-19 14:20:15 UTC (rev 6887)
@@ -163,7 +163,9 @@
       <para>JBoss Messaging allows producers to be created which limit</para>
       <section>
          <title>Window based flow control</title>
-         <para>TODO</para>
+         <para>JBoss Messaging clients maintain a buffer of commands that have been sent to the server, thus provides a form
+         of flow control. Please see the chapter on <xref linkend="command-buffering">command buffering</xref> for more information
+         on this.</para>
       </section>
       <section>
          <title>Rate limited flow control</title>

Modified: trunk/examples/core/embedded/src/org/jboss/core/example/EmbeddedExample.java
===================================================================
--- trunk/examples/core/embedded/src/org/jboss/core/example/EmbeddedExample.java	2009-05-19 14:07:17 UTC (rev 6886)
+++ trunk/examples/core/embedded/src/org/jboss/core/example/EmbeddedExample.java	2009-05-19 14:20:15 UTC (rev 6887)
@@ -23,8 +23,6 @@
 
 import java.util.Date;
 
-import javax.jms.TextMessage;
-
 import org.jboss.messaging.core.client.ClientConsumer;
 import org.jboss.messaging.core.client.ClientMessage;
 import org.jboss.messaging.core.client.ClientProducer;




More information about the jboss-cvs-commits mailing list