You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2012/08/12 21:03:53 UTC

svn commit: r1372179 [9/18] - in /qpid/site/docs/books/0.18: ./ AMQP-Messaging-Broker-CPP-Book/ AMQP-Messaging-Broker-CPP-Book/html/ AMQP-Messaging-Broker-CPP-Book/html/css/ AMQP-Messaging-Broker-CPP-Book/html/images/ AMQP-Messaging-Broker-CPP-Book/pdf...

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Configuration-Guide.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Configuration-Guide.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Configuration-Guide.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Configuration-Guide.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,190 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>1.5. Broker Configuration Guide</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Java-General-User-Guides.html" title="Chapter 1. General User Guides"><link rel="prev" href="Qpid-Troubleshooting-Guide.html" title="1.4.  Qpid Troubleshooting Guide"><link rel="next" href="High-Availability.html" title="1.6. High Availability"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.
 html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href
 ="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href
 ="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-General-User-Guides.html">General User Guides</a></span> &gt; <span class="breadcrumb-node">Broker Configuration Guide </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Configuration-Guide"></a>1.5. Broker Configuration Guide </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"
 ><a name="Qpid-Producer-Flow-Control"></a>1.5.1. Producer Flow Control</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidProducerFlowControlGeneralInformation"></a>1.5.1.1. General Information</h4></div></div></div><p>
+            The Qpid 0.6 release introduced a simplistic producer-side flow control mechanism
+            into the Java Messaging Broker, causing producers to be flow-controlled when they
+            attempt to send messages to an overfull queue. Qpid 0.18 introduced a similar
+            mechanism triggered by an overfull persistent message store on a virtual host.
+        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidProducerFlowControlServerConfiguration"></a>1.5.1.2. Server Configuration</h4></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2494668"></a>Configuring a Queue to use flow control</h5></div></div></div><p>
+                Flow control is enabled on a producer when it sends a message to a Queue
+                which is "overfull". The producer flow control will be rescinded when all
+                Queues on which a producer is blocking become "underfull". A Queue is defined
+                as overfull when the size (in bytes) of the messages on the queue exceeds the
+                "capacity" of the Queue. A Queue becomes "underfull" when its size becomes
+                less than the "flowResumeCapacity".
+
+                </p><pre class="programlisting">
+                
+&lt;queue&gt;
+    &lt;name&gt;test&lt;/name&gt;
+    &lt;test&gt;
+        &lt;exchange&gt;amq.direct&lt;/exchange&gt;
+        &lt;capacity&gt;10485760&lt;/capacity&gt;                     &lt;!-- set the queue capacity to 10Mb --&gt;
+        &lt;flowResumeCapacity&gt;8388608&lt;/flowResumeCapacity&gt;  &lt;!-- set the resume capacity to 8Mb --&gt;
+    &lt;/test&gt;
+&lt;/queue&gt;
+                
+                </pre><p>
+
+                The default for all queues on a virtual host can also be set
+
+                </p><pre class="programlisting">
+                
+&lt;virtualhosts&gt;
+    &lt;virtualhost&gt;
+        &lt;name&gt;localhost&lt;/name&gt;
+        &lt;localhost&gt;
+            &lt;capacity&gt;10485760&lt;/capacity&gt;                     &lt;!-- set the queue capacity to 10Mb --&gt;
+            &lt;flowResumeCapacity&gt;8388608&lt;/flowResumeCapacity&gt;  &lt;!-- set the resume capacity to 8Mb --&gt;
+        &lt;/localhost&gt;
+    &lt;/virtualhost&gt;
+&lt;/virtualhosts&gt;
+                
+                </pre><p>
+
+                Where no flowResumeCapacity is set, the flowResumeCapacity is set to be equal
+                to the capacity. Where no capacity is set, capacity is defaulted to 0 meaning
+                there is no capacity limit.
+            </p><div class="section" lang="en"><div class="titlepage"><div><div><h6 class="title"><a name="id2494784"></a>Broker Log Messages</h6></div></div></div><p>
+                    There are four new Broker log messages that may occur if flow control through queue capacity limits is enabled.
+                    Firstly, when a capacity limited queue becomes overfull, a log message similar to the following is produced
+                </p><pre class="programlisting">
+MESSAGE [vh(/test)/qu(MyQueue)] [vh(/test)/qu(MyQueue)] QUE-1003 : Overfull : Size : 1,200 bytes, Capacity : 1,000
+                </pre><p>Then for each channel which becomes blocked upon the overful queue a log message similar to the following is produced:</p><pre class="programlisting">
+MESSAGE [con:2(guest@anonymous(713889609)/test)/ch:1] [con:2(guest@anonymous(713889609)/test)/ch:1] CHN-1005 : Flow Control Enforced (Queue MyQueue)
+                </pre><p>When enough messages have been consumed from the queue that it becomes underfull, then the following log is generated: </p><pre class="programlisting">
+MESSAGE [vh(/test)/qu(MyQueue)] [vh(/test)/qu(MyQueue)] QUE-1004 : Underfull : Size : 600 bytes, Resume Capacity : 800
+                </pre><p>And for every channel which becomes unblocked you will see a message similar to: </p><pre class="programlisting">
+MESSAGE [con:2(guest@anonymous(713889609)/test)/ch:1] [con:2(guest@anonymous(713889609)/test)/ch:1] CHN-1006 : Flow Control Removed
+                </pre><p>Obviously the details of connection, virtual host, queue, size, capacity, etc would depend on the configuration in use.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2494853"></a>Disk quota-based flow control</h5></div></div></div><p>
+                Since version 0.18 of Qpid Broker, flow control can be triggered when a
+                configured disk quota is exceeded. This is supported by the BDB and Derby message stores.
+            </p><p>
+                This functionality blocks all producers on reaching the disk overflow limit. When consumers
+                consume the messages, causing disk space usage to falls below the underflow limit, the
+                producers are unblocked and continue working as normal.
+            </p><p>
+                Two limits can be configured:
+            </p><p>
+                overfull limit - the maximum space on disk (in bytes) which can be used by store.
+            </p><p>
+                underfull limit - when the space on disk drops below this limit, producers are allowed to resume publishing.
+            </p><p>
+                An example of quota configuration for the BDB message store is provided below.
+            </p><pre class="programlisting">
+            
+&lt;store&gt;
+   &lt;class&gt;org.apache.qpid.server.store.berkeleydb.BDBMessageStore&lt;/class&gt;
+   &lt;environment-path&gt;${work}/bdbstore/test&lt;/environment-path&gt;
+   &lt;overfull-size&gt;50000000&lt;/overfull-size&gt;
+   &lt;underfull-size&gt;45000000&lt;/underfull-size&gt;
+&lt;/store&gt;
+            
+            </pre><p>
+                The disk quota functionality is based on "best effort" principle. This means the broker
+                cannot guarantee that the disk space limit will not be exceeded. If several concurrent
+                transactions are started before the limit is reached, which collectively cause the limit
+                to be exceeded, the broker may allow all of them to be committed.
+            </p><div class="section" lang="en"><div class="titlepage"><div><div><h6 class="title"><a name="id2493780"></a>Broker Log Messages for quota flow control</h6></div></div></div><p>
+                    There are 2 new broker log messages that may occur if flow control through disk quota limits is enabled.
+                    When the virtual host is blocked due to exceeding of the disk quota limit the following message
+                    appears in the broker log
+                    </p><pre class="programlisting">
+[vh(/test)/ms(BDBMessageStore)] MST-1008 : Store overfull, flow control will be enforced
+                    </pre><p>
+                    When virtual host is unblocked after cleaning the disk space the following message appears in the broker log
+                    </p><pre class="programlisting">
+[vh(/test)/ms(BDBMessageStore)] MST-1009 : Store overfull condition cleared
+                    </pre><p>
+                </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="QpidProducerFlowControlClientImpact"></a>1.5.1.3. Client impact and configuration</h4></div></div></div><p>
+            If a producer sends to a queue which is overfull, the broker will respond by
+            instructing the client not to send any more messages. The impact of this is
+            that any future attempts to send will block until the broker rescinds the flow control order.
+        </p><p>
+            While blocking the client will periodically log the fact that it is blocked waiting on flow control.
+        </p><pre class="programlisting">
+WARN   Message send delayed by 5s due to broker enforced flow control
+WARN   Message send delayed by 10s due to broker enforced flow control
+        </pre><p>
+            After a set period the send will timeout and throw a JMSException to the calling code.
+        </p><p>
+            If such a JMSException is thrown, the message will not be sent to the broker,
+            however the underlying Session may still be active - in particular if the
+            Session is transactional then the current transaction will not be automatically
+            rolled back. Users may choose to either attempt to resend the message, or to
+            roll back any transactional work and close the Session.
+        </p><p>
+            Both the timeout delay and the periodicity of the warning messages can be set
+            using Java system properties.
+        </p><p>
+            The amount of time (in milliseconds) to wait before timing out
+            is controlled by the property qpid.flow_control_wait_failure.
+        </p><p>
+            The frequency at which the log message informing that the producer is flow
+            controlled is sent is controlled by the system property qpid.flow_control_wait_notify_period.
+        </p><p>
+            Adding the following to the command line to start the client would result in a timeout of one minute,
+            with warning messages every ten seconds:
+        </p><pre class="programlisting">
+-Dqpid.flow_control_wait_failure=60000
+-Dqpid.flow_control_wait_notify_period=10000
+        </pre><div class="section" lang="en"><div class="titlepage"><div><div><h5 class="title"><a name="id2493891"></a>Older Clients</h5></div></div></div><p>
+                The flow control feature was first added to the Java broker/client in the 0.6 release. If an older client connects to the broker then the flow control commands will be ignored by it and it will not be blocked. So to fully benefit from this feature both Client and Broker need to be at least version 0.6.
+            </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2494910"></a>1.5.2. Topic Configuration on Java Broker</h3></div></div></div><p>New in 0.8 is the ability to define configuration for topics. Currently this is limited to
+        configuration for slow consumer detection. This configuration is based on the work
+        designed on the <a class="ulink" href="http://cwiki.apache.org/confluence/display/qpid/Topic+Configuration+Design" target="_top">design
+            wiki</a>.</p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Topic%20Identification"></a>1.5.2.1. Topic Identification</h4></div></div></div><p>A configuration section has two entries that can be used to identify how the
+            configuration will be applied: 'name' and 'subscriptionName'.  
+            
+            </p><pre class="programlisting">            
+                     &lt;topic&gt;
+                         &lt;name&gt;stocks.us&lt;/name&gt;        
+                </pre><p>
+            </p><pre class="programlisting">
+                     &lt;topic&gt;
+                         &lt;subscriptionName&gt;clientid:mysubscription&lt;/subscriptionName&gt;        
+            </pre><p>
+            
+            It is also possible to combine these two identifiers to specify a unique subscription to
+            a given topic.
+            
+            </p><pre class="programlisting">
+                    &lt;topic&gt;
+                        &lt;name&gt;stocks.us&lt;/name&gt;
+                        &lt;subscriptionName&gt;clientid:mysubscription&lt;/subscriptionName&gt;
+            </pre><p>
+        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2494381"></a>1.5.2.2. Configuration Items</h4></div></div></div><p> Currently only one element of the designed configuration is processed, that of the
+            slow consumer detection. This is setup as below using the 'slow-consumer-detection'
+            element. There are two required types of tag, first the trigger, which is one of
+            'depth', 'messageAge' or 'messageCount' and secondly the 'policy'. </p><pre class="programlisting">
+	    &lt;slow-consumer-detection&gt;
+                &lt;!-- The maximum depth before which the policy will be applied--&gt;
+                &lt;depth&gt;4235264&lt;/depth&gt;
+
+                &lt;!-- The maximum message age before which the policy will be applied--&gt;
+                &lt;messageAge&gt;600000&lt;/messageAge&gt;
+
+                &lt;!-- The maximum number of message before which the policy will be applied--&gt;
+                &lt;messageCount&gt;50&lt;/messageCount&gt;
+
+                &lt;!-- Policy Selection --&gt;
+                &lt;policy name="TopicDelete"/&gt;
+            &lt;/slow-consumer-detection&gt;
+        </pre><p> The trigger is used to determine when the policy should be applied. Currently we have
+            a simple policy 'topicdelete', this will disconnect consumers of topics where their
+            consumption rate falls sufficiently to hit one of the trigger values. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Limitiations"></a>1.5.2.3. Limitiations</h4></div></div></div><p> As of 0.8 the topic configuration is limited to straight string matching. This means
+            that given the following two topic configuring sections for 'stocks.us' and 'stocks.*' a
+            subscription for 'stocks.uk' will not match the expected 'stocks.*'. Nor will any
+            additional configuration listed in 'stocks.*' affect any 'stocks.us' subscriptions. </p><pre class="programlisting">
+            &lt;topics&gt;
+                &lt;topic&gt;
+            	    &lt;name&gt;stocks.us&lt;/name&gt;
+	                ...
+	            &lt;/topic&gt;
+    	        &lt;topic&gt;
+	               &lt;name&gt;stocks.*&lt;/name&gt;
+	               ...
+                &lt;/topic&gt;
+            &lt;/topics&gt;
+    </pre><p> A subscription for 'stocks.us' will only receive configuration settings that are
+            defined in the 'stocks.us' section. </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Qpid-Troubleshooting-Guide.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-General-User-Guides.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="High-Availability.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.4. 
+      Qpid Troubleshooting Guide
+     </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 1.6. High Availability</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Debug-Logging.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Debug-Logging.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Debug-Logging.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Debug-Logging.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,251 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.7.  Debug using log4j</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Qpid-Java-Broker-HowTos.html" title="Chapter 2. How Tos"><link rel="prev" href="Qpid-Java-Broker-Virtualhosts-Config.html" title="2.6.  Configure the Virtual Hosts via virtualhosts.xml"><link rel="next" href="How-to-Tune-M3-Java-Broker-Performance.html" title="2.8.  How to Tune M3 Java Broker Performance"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Q
 pid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_
 repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV clas
 s="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Qpid-Java-Broker-HowTos.html">How Tos</a></span> &gt; <span class="breadcrumb-node">
+      Debug using log4j
+    </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Debug-Logging"></a>2.7. 
+      Debug using log4j
+    </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="Debugusinglog4j-Debuggingwithlog4jconfigurations"></a>2.7.1. 
+            Debugging
+            with log4j configurations
+          </h3></div></div></div><p>
+            Unfortunately setting of logging in the Java Broker is not simply
+            a matter of setting one of WARN,INFO,DEBUG. At some point in the
+            future we may have more BAU logging that falls in to that
+            category but more likely is that we will have a varioius config
+            files that can be swapped in (dynamically) to understand what is
+            going on.
+          </p><p>
+            This page will be host to a variety of useful configuration
+            setups that will allow a user or developer to extract only the
+            information they are interested in logging. Each section will be
+            targeted at logging in a particular area and will include a full
+            log4j file that can be used. In addition the logging
+            <span class="emphasis"><em>category</em></span> elements will be presented and discussed so
+            that the user can create their own file.
+          </p><p>
+            Currently the configuration that is available has not been fully
+            documented and as such there are gaps in what is desired and what
+            is available. Some times this is due to the desire to reduce the
+            overhead in message processing, but sometimes it is simply an
+            oversight. Hopefully in future releases the latter will be
+            addressed but care needs to be taken when adding logging to the
+            'Message Flow' path as this will have performance implications.
+          </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Debugusinglog4j-LoggingConnectionState-5CDeprecated-5C"></a>2.7.1.1. 
+            Logging
+            Connection State *Deprecated*
+          </h4></div></div></div><p>
+            <span class="emphasis"><em>deprecation notice</em></span> Version 0.6 of the Java broker includes
+            <a class="xref" href="">???</a> functionality which improves upon these messages and
+            as such enabling status logging would be more beneficial.
+            The configuration file has been left here for assistence with
+            broker versions prior to 0.6.
+          </p><p>
+            The goals of this configuration are to record:
+          </p><div class="itemizedlist"><ul><li><p>New Connections
+            </p></li><li><p>New Consumers
+            </p></li><li><p>Identify slow consumers
+            </p></li><li><p>Closing of Consumers
+            </p></li><li><p>Closing of Connections
+            </p></li></ul></div><p>
+            An additional goal of this configuration is to minimise any
+            impact to the 'message flow' path. So it should not adversely
+            affect production systems.
+          </p><pre class="programlisting">
+
+&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
+    &lt;appender name="FileAppender" class="org.apache.log4j.FileAppender"&gt;
+        &lt;param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/&gt;
+        &lt;param name="Append" value="false"/&gt;
+
+        &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+            &lt;param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/&gt;
+        &lt;/layout&gt;
+
+    &lt;/appender&gt;
+
+    &lt;appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"&gt;
+
+        &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+            &lt;param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+
+    &lt;category name="Qpid.Broker"&gt;
+
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+
+
+    &lt;!-- Provide warnings to standard output --&gt;
+    &lt;category name="org.apache.qpid"&gt;
+        &lt;priority value="warn"/&gt;
+    &lt;/category&gt;
+
+
+    &lt;!-- Connection Logging --&gt;
+
+    &lt;!-- Log details of client starting connection --&gt;
+    &lt;category name="org.apache.qpid.server.handler.ConnectionStartOkMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Log details of client closing connection --&gt;
+    &lt;category name="org.apache.qpid.server.handler.ConnectionCloseMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Log details of client responding to be asked to closing connection --&gt;
+
+    &lt;category name="org.apache.qpid.server.handler.ConnectionCloseOkMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+
+    &lt;!-- Consumer Logging --&gt;
+    &lt;!-- Provide details of Consumers connecting--&gt;
+    &lt;category name="org.apache.qpid.server.handler.BasicConsumeMethodHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- Provide details of Consumers disconnecting, if the call it--&gt;
+    &lt;category name="org.apache.qpid.server.handler.BasicCancelMethodHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Provide details of when a channel closes to attempt to match to the Consume as a Cancel is not always issued--&gt;
+    &lt;category name="org.apache.qpid.server.handler.ChannelCloseHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- Provide details of Consumers starting to consume--&gt;
+    &lt;category name="org.apache.qpid.server.handler.ChannelFlowHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Provide details of what consumers are going to be consuming--&gt;
+    &lt;category name="org.apache.qpid.server.handler.QueueBindHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- No way of determining if publish message is returned, client log should show it.--&gt;
+
+    &lt;root&gt;
+        &lt;priority value="debug"/&gt;
+        &lt;appender-ref ref="STDOUT"/&gt;      
+        &lt;appender-ref ref="FileAppender"/&gt;
+    &lt;/root&gt;
+
+&lt;/log4j:configuration&gt;
+
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="Debugusinglog4j-DebuggingMyApplication"></a>2.7.1.2. 
+            Debugging My
+            Application
+          </h4></div></div></div><p>
+            This is the most often asked for set of configuration. The goals
+            of this configuration are to record:
+          </p><div class="itemizedlist"><ul><li><p>New Connections
+            </p></li><li><p>New Consumers
+            </p></li><li><p>Message Publications
+            </p></li><li><p>Message Consumption
+            </p></li><li><p>Identify slow consumers
+            </p></li><li><p>Closing of Consumers
+            </p></li><li><p>Closing of Connections
+            </p></li></ul></div><p>
+            NOTE: This configuration enables message logging on the 'message
+            flow' path so should only be used were message volume is
+            low.
+            <span class="emphasis"><em>Every message that is sent to the broker will generate at
+            least four logging statements</em></span>
+          </p><pre class="programlisting">
+
+&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
+    &lt;appender name="FileAppender" class="org.apache.log4j.FileAppender"&gt;
+        &lt;param name="File" value="${QPID_WORK}/log/${logprefix}qpid${logsuffix}.log"/&gt;
+        &lt;param name="Append" value="false"/&gt;
+
+        &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+            &lt;param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/&gt;
+        &lt;/layout&gt;
+
+    &lt;/appender&gt;
+
+    &lt;appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"&gt;
+
+        &lt;layout class="org.apache.log4j.PatternLayout"&gt;
+            &lt;param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/&gt;
+        &lt;/layout&gt;
+    &lt;/appender&gt;
+
+    &lt;category name="Qpid.Broker"&gt;
+
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+
+
+    &lt;!-- Provide warnings to standard output --&gt;
+    &lt;category name="org.apache.qpid"&gt;
+        &lt;priority value="warn"/&gt;
+    &lt;/category&gt;
+
+
+    &lt;!-- Connection Logging --&gt;
+
+    &lt;!-- Log details of client starting connection --&gt;
+    &lt;category name="org.apache.qpid.server.handler.ConnectionStartOkMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Log details of client closing connection --&gt;
+    &lt;category name="org.apache.qpid.server.handler.ConnectionCloseMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Log details of client responding to be asked to closing connection --&gt;
+
+    &lt;category name="org.apache.qpid.server.handler.ConnectionCloseOkMethodHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- Consumer Logging --&gt;
+    &lt;!-- Provide details of Consumers connecting--&gt;
+    &lt;category name="org.apache.qpid.server.handler.BasicConsumeMethodHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- Provide details of Consumers disconnecting, if the call it--&gt;
+    &lt;category name="org.apache.qpid.server.handler.BasicCancelMethodHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Provide details of when a channel closes to attempt to match to the Consume as a Cancel is not always issued--&gt;
+    &lt;category name="org.apache.qpid.server.handler.ChannelCloseHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- Provide details of Consumers starting to consume--&gt;
+    &lt;category name="org.apache.qpid.server.handler.ChannelFlowHandler"&gt;
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+    &lt;!-- Provide details of what consumers are going to be consuming--&gt;
+    &lt;category name="org.apache.qpid.server.handler.QueueBindHandler"&gt;
+        &lt;priority value="info"/&gt;
+    &lt;/category&gt;
+
+    &lt;!-- No way of determining if publish message is returned, client log should show it.--&gt;
+
+    &lt;!-- WARNING DO NOT ENABLE THIS IN PRODUCTION --&gt;
+    &lt;!-- Will generate minimum one log statements per published message --&gt;
+    &lt;!-- Will generate will log receiving of all body frame, count will vary on size of message.--&gt;
+    &lt;!-- Empty Message = no body, Body is up to 64kb of data --&gt;
+    &lt;!-- Will generate three log statements per recevied message --&gt;
+
+    &lt;!-- Log messages flow--&gt;
+    &lt;category name="org.apache.qpid.server.AMQChannel"&gt;
+
+        &lt;priority value="debug"/&gt;
+    &lt;/category&gt;
+
+    &lt;root&gt;
+        &lt;priority value="debug"/&gt;
+        &lt;appender-ref ref="STDOUT"/&gt;      
+        &lt;appender-ref ref="FileAppender"/&gt;
+    &lt;/root&gt;
+
+&lt;/log4j:configuration&gt;
+
+</pre></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Qpid-Java-Broker-Virtualhosts-Config.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Qpid-Java-Broker-HowTos.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="How-to-Tune-M3-Java-Broker-Performance.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.6. 
+      Configure the Virtual Hosts via virtualhosts.xml
+     </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.8. 
+      How to Tune M3 Java Broker Performance
+    </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Slow-Consumer-Disconnect.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Slow-Consumer-Disconnect.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Slow-Consumer-Disconnect.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Slow-Consumer-Disconnect.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,116 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.11. Slow Consumer Disconnect - User Guide</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Qpid-Java-Broker-HowTos.html" title="Chapter 2. How Tos"><link rel="prev" href="Priority-Queues.html" title="2.10.  Use Priority Queues"><link rel="next" href="Qpid-JMX-Management-Console.html" title="Chapter 3.  Qpid JMX Management Console"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apach
 e.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI
 ><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL
 ><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Qpid-Java-Broker-HowTos.html">How Tos</a></span> &gt; <span class="breadcrumb-node">Slow Consumer Disconnect - User Guide</span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Slow-Consumer-Disconnect"></a>2.11. Slow Consumer Disconnect - User Guide</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><d
 iv><div><h3 class="title"><a name="id2526441"></a>2.11.1. Introduction</h3></div></div></div><p>Slow Consumer Disconnect (SCD) is a new feature in Qpid that provides a configurable
+        mechanism to prevent a single slow consumer from causing a back up of unconsumed messages on
+        the broker. </p><p>This is most relevant where Topics are in use, since a published message is not removed
+        from the broker's memory until all subscribers have acknowledged that message. </p><p>Cases where a consumer is 'slow' can arise due to one of the following: poor network
+        connectivity exists; a transient system issue affects a single client; a single subscriber
+        written by a client team is behaving incorrectly and not acknowledging messages; a
+        downstream resource such as a database is non-responsive. </p><p>SCD will enable the application owner to configure limits for a given consumer's queue and
+        the behaviour to execute when those limits are reached. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2526475"></a>2.11.2. What can it do?</h3></div></div></div><p>SCD is only applicable to topics or durable subscriptions and can be configured on either
+        a topic or a subscription name. </p><p>On triggering of a specified threshold the offending client will be disconnected from the
+        broker with a 506 error code wrapped in a JMSException returned to the client via the
+        ExceptionListener registered on the Connection object. </p><p>Note that it is essential that an ExceptionListener be specified by the client on
+        creation of the connection and that exceptions coming back on that listener are handled
+        correctly. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2526501"></a>2.11.3. Frequency of SCD Checking</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526506"></a>2.11.3.1. <span class="bold"><strong>Configuring Frequency</strong></span></h4></div></div></div><p>You can configure the frequency with which the SCD process will check for slow consumers,
+          along with the unit of time used to specify that frequency. </p><p>The <span class="italic">virtualhosts.virtualhost.hostname.slow-consumer-detection</span>
+          elements <span class="italic">delay</span> and <span class="italic">timeunit</span>
+          are used to specify the frequency and timeunit respectively in the virtualhosts.xml
+          file e.g. </p><pre class="programlisting">
+&lt;virtualhosts&gt;
+	&lt;default&gt;test&lt;/default&gt;
+	&lt;virtualhost&gt;
+		&lt;name&gt;test&lt;/name&gt;
+		&lt;test&gt;
+		   &lt;slow-consumer-detection&gt;
+			&lt;delay&gt;60&lt;delay/&gt;
+			&lt;timeunit&gt;seconds&lt;timeunit/&gt;
+		&lt;slow-consumer-detection/&gt;
+		&lt;/test&gt;
+	&lt;/virtualhost&gt;
+&lt;/virtualhosts&gt;
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526556"></a>2.11.3.2. <span class="bold"><strong>SCD Log output</strong></span></h4></div></div></div><p>When the SCD component finds a queue with a configured threshold to check, the operational
+          logging component (if enabled) will output the following line:</p><pre class="programlisting">
+    SCD-1003 : Checking Status of Queue
+    </pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2526581"></a>2.11.4. Client Exception<span class="bold"><strong>s</strong></span></h3></div></div></div><p>When a Slow Consumer is disconnected, the client receives a 506 error from the broker
+        wrapped in a JMSException and the Session and Connection are closed:</p><pre class="programlisting">
+Dispatcher-Channel-1 2010-09-01 16:23:34,206 INFO [qpid.client.AMQSession.Dispatcher]
+    Dispatcher-Channel-1 thread terminating for channel 1:org.apache.qpid.client.AMQSession_0_8@1de8aa8
+pool-2-thread-3 2010-09-01 16:23:34,238 INFO [apache.qpid.client.AMQConnection] Closing AMQConnection due to
+    :org.apache.qpid.AMQChannelClosedException: Error: Consuming to slow. [error code 506: resource error]
+javax.jms.JMSException: 506
+at org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.java:1396)
+at org.apache.qpid.client.protocol.AMQProtocolHandler.exception(AMQProtocolHandler.java:329)
+at org.apache.qpid.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:536)
+at org.apache.qpid.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:453)
+at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
+at org.apache.qpid.client.protocol.AMQProtocolHandler$1.run(AMQProtocolHandler.java:462)
+at org.apache.qpid.pool.Job.processAll(Job.java:110)
+at org.apache.qpid.pool.Job.run(Job.java:149)
+at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
+at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
+at java.lang.Thread.run(Thread.java:619)
+Caused by: org.apache.qpid.AMQChannelClosedException: Error: Consuming to slow. [error code 506: resource error]
+at org.apache.qpid.client.handler.ChannelCloseMethodHandler.methodReceived(ChannelCloseMethodHandler.java:96)
+at org.apache.qpid.client.handler.ClientMethodDispatcherImpl.dispatchChannelClose(ClientMethodDispatcherImpl.java:163)
+at org.apache.qpid.framing.amqp_8_0.ChannelCloseBodyImpl.execute(ChannelCloseBodyImpl.java:140)
+at org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:112)
+at org.apache.qpid.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:511)
+... 8 more
+main 2010-09-01 16:23:34,316 INFO [apache.qpid.client.AMQSession] Closing session:
+    org.apache.qpid.client.AMQSession_0_8@ffeef1
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2526640"></a>2.11.5. Disconnection Thresholds</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526646"></a>2.11.5.1. Topic Subscriptions</h4></div></div></div><p>One key feature of SCD is the disconnection of a consuming client when a specified
+          threshold is exceeded. For a pub-sub model using topics, this means that messages will no
+          longer be delivered to the private queue which was associated with that consuming client,
+          thus reducing any associated backlog in the broker. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526663"></a>2.11.5.2. Durable Topic Subscriptions</h4></div></div></div><p>For durable subscriptions, simply disconnecting the consuming client will not suffice
+          since the associated queue is by definition durable and messages would continue to flow to
+          it after disconnection, potentially worsening any backing up of data on the broker. </p><p>The solution is to configure durable subscriptions to delete the underlying queue on
+          disconnection. This means that messages will no longer be delivered to the private queue
+          associated with the subscription, thus preventing any backlog. </p><p>Full details of how to configure the thresholds are provided below. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526691"></a>2.11.5.3. Message Age Threshold</h4></div></div></div><p>You can configure SCD to be triggered on a topic or subscription when the oldest message
+          in the associated private queue for the consumer ages beyond the specified value, in
+          milliseconds. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526706"></a>2.11.5.4. Queue Depth Threshold</h4></div></div></div><p>You can opt to use the depth of the queue in bytes as a threshold. SCD will be triggered
+          by a queue depth greater than the threshold specified i.e. when a broker receives a
+          message that takes the queue depth over the threshold. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526720"></a>2.11.5.5. Message Count Threshold</h4></div></div></div><p>You can use the message count for the consumer's queue as the trigger, where a count
+          higher than that specified will trigger disconnection. </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2526734"></a>2.11.5.6. <span class="bold"><strong>Delete Policy</strong></span></h4></div></div></div><p>You can configure the policy you wish to apply in your broker configuration. There are
+          currently 2 policies available: </p><p>
+<span class="bold"><strong>Delete Temporary Queues Only</strong></span>
+    </p><p>If you do not specify a &lt;topicDelete/&gt; element in your configuration, then only temporary
+          queues associated with a topic subscription will be deleted on client disconnect. This is
+          the default behaviour. </p><p></p><p>
+<span class="bold"><strong>Delete Durable Subscription Queues</strong></span>
+    </p><p>If you add the &lt;topicDelete/&gt; element with the sub-element
+          &lt;delete-persistent/&gt; to your config, then the persistent queue which is associated
+          with durable subscriptions to a topic will also be deleted. This is an important
+          consideration since without deleting the underlying queue the client's unconsumed data
+          will grow indefinitely while they will be unable to reconnect to that queue due to the SCD
+          threshold configured, potentially having an adverse effect on the application or broker in
+          use.</p><p></p><p><span class="bold"><strong> Example Topic Configuration </strong></span></p><p></p><p>
+The following steps are required to configure SCD:
+    </p><div class="itemizedlist"><ul><li><p>Enable SCD checking for your virtual host</p></li><li><p>Specify frequency for SCD checking</p></li><li><p>Define thresholds for the topic</p></li><li><p>Define the policy to apply on trigger </p></li></ul></div><p>The example below shows a simple definition, with all three thresholds specified and a
+          simple disconnection, with deletion of any temporary queue, defined. </p><p>For a durable subscription to this topic, no queue deletion would be applied on disconnect
+          - which is likely to be undesirable (see section above). </p><pre class="programlisting">
+&lt;topics&gt;
+	 &lt;topic&gt;
+	 &lt;name&gt;stocks.us.*&lt;/name&gt;
+		 &lt;slow-consumer-detection&gt;
+			 &lt;!-- The maximum depth before which --&gt;
+			 &lt;!-- the policy will be applied--&gt;
+			 &lt;depth&gt;4235264&lt;/depth&gt;
+			 &lt;!-- The maximum message age before which --&gt;
+			 &lt;!-- the policy will be applied--&gt;
+			 &lt;messageAge&gt;600000&lt;/messageAge&gt;
+			 &lt;!-- The maximum number of message before --&gt;
+			 &lt;!-- which the policy will be applied--&gt;
+			 &lt;messageCount&gt;50&lt;/messageCount&gt;
+			 &lt;!-- Policy Selection --&gt;
+			 &lt;policy name="TopicDelete"/&gt;
+		 &lt;/slow-consumer-detection&gt;
+	 &lt;/topic&gt;
+&lt;/topics&gt;
+</pre></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2526871"></a>2.11.6. Important Points To Note</h3></div></div></div><p> Client application developers should be educated about how to correctly handle being
+        disconnected with a 506 error code, to avoid them getting into a thrashing state where they
+        continually attempt to connect, fail to consume fast enough and are disconnected again. </p><p>Clients affected by slow consumer disconnect configuration should always use transactions
+        where duplicate processing of an incoming message would have adverse affects, since they may
+        receive a message more than once if disconnected before acknowledging a message in flight. </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Priority-Queues.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Qpid-Java-Broker-HowTos.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Qpid-JMX-Management-Console.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.10. 
+      Use Priority Queues
+     </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. 
+    Qpid JMX Management Console
+  </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Environment-Variables.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Environment-Variables.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Environment-Variables.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-Environment-Variables.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,44 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>1.3.  Java Environment Variables</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Java-General-User-Guides.html" title="Chapter 1. General User Guides"><link rel="prev" href="Qpid-Java-FAQ.html" title="1.2.  Qpid Java FAQ"><link rel="next" href="Qpid-Troubleshooting-Guide.html" title="1.4.  Qpid Troubleshooting Guide"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">
 Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http
 ://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http
 ://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-General-User-Guides.html">General User Guides</a></span> &gt; <span class="breadcrumb-node">
+      Java Environment Variables
+    </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Environment-Variables"></a>1.3. 
+      Java Environment Variables
+    </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="JavaEnvironmentVariables-SettingQpidEnvironmentVariables"></a>1.3.1. 
+            Setting
+            Qpid Environment Variables
+          </h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="JavaEnvironmentVariables-QpidDeploymentPathVariables"></a>1.3.1.1. 
+            Qpid
+            Deployment Path Variables
+          </h4></div></div></div><p>
+            There are two main Qpid environment variables which are required
+            to be set for Qpid deployments, QPID_HOME and QPID_WORK.
+          </p><p>
+            QPID_HOME - This variable is used to tell the Qpid broker where
+            it's installed home is, which is in turn used to find dependency
+            JARs which Qpid uses.
+          </p><p>
+            QPID_WORK - This variable is used by Qpid when creating all
+            'writeable' directories that it uses. This includes the log
+            directory and the storage location for any BDB instances in use
+            by your deployment (if you're using persistence with BDB). If you
+            do not set this variable, then the broker will default (in the
+            qpid-server script) to use the current user's homedir as the root
+            directory for creating the writeable locations that it uses.
+          </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="JavaEnvironmentVariables-SettingMaxMemoryforthebroker"></a>1.3.1.2. 
+            Setting
+            Max Memory for the broker
+          </h4></div></div></div><p>
+            If you simply start the Qpid broker, it will default to use a
+            -Xmx setting of 1024M for the broker JVM. However, we would
+            recommend that you make the maximum -Xmx heap size available, if
+            possible, of 3Gb (for 32-bit platforms).
+          </p><p>
+            You can control the memory setting for your broker by setting the
+            QPID_JAVA_MEM variable before starting the broker e.g. -Xmx3668m
+            . Enclose your value within quotes if you also specify a -Xms
+            value. The value in use is echo'd by the qpid-server script on
+            startup.
+          </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Qpid-Java-FAQ.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-General-User-Guides.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Qpid-Troubleshooting-Guide.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1.2. 
+      Qpid Java FAQ
+     </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 1.4. 
+      Qpid Troubleshooting Guide
+    </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-General-User-Guides.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-General-User-Guides.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-General-User-Guides.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Java-General-User-Guides.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,60 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 1. General User Guides</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="prev" href="pr01.html" title="Introduction"><link rel="next" href="Qpid-Java-FAQ.html" title="1.2.  Qpid Java FAQ"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apache.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/downloa
 d.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></LI><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A>
 </LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><UL><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.
 apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-node">General User Guides</span></DIV><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Java-General-User-Guides"></a>Chapter 1. General User Guides</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="Java-General-User-Guides.html#id2492438">1.1. 
+      Java Broker Feature Guide
+    </a></span></dt><dd><dl><dt><span class="section"><a href="Java-General-User-Guides.html#JavaBrokerFeatureGuide-TheQpidpureJavabrokercurrentlysupportsthefollowingfeatures-3A">1.1.1. 
+            The Qpid pure Java broker currently supports the following
+            features:
+          </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Java-FAQ.html">1.2. 
+      Qpid Java FAQ
+    </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Java-FAQ.html#QpidJavaFAQ-Purpose">1.2.1. Purpose</a></span></dt></dl></dd><dt><span class="section"><a href="Java-Environment-Variables.html">1.3. 
+      Java Environment Variables
+    </a></span></dt><dd><dl><dt><span class="section"><a href="Java-Environment-Variables.html#JavaEnvironmentVariables-SettingQpidEnvironmentVariables">1.3.1. 
+            Setting
+            Qpid Environment Variables
+          </a></span></dt></dl></dd><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html">1.4. 
+      Qpid Troubleshooting Guide
+    </a></span></dt><dd><dl><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html#QpidTroubleshootingGuide-I-27mgettingajava.lang.UnsupportedClassVersionErrorwhenItrytostartthebroker.Whatdoesthismean-3F">1.4.1. 
+            I'm getting a java.lang.UnsupportedClassVersionError when I
+            try to start the broker. What does this mean ?
+          </a></span></dt><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html#QpidTroubleshootingGuide-I-27mhavingaproblembindingtotherequiredhost-3Aportatbrokerstartup-3F">1.4.2. 
+            I'm having a problem binding to the required host:port at
+            broker startup ?
+          </a></span></dt><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html#QpidTroubleshootingGuide-I-27mhavingproblemswithmyclasspath.HowcanIensurethatmyclasspathisok-3F">1.4.3. 
+            I'm having problems with my classpath. How can I ensure that
+            my classpath is ok ?
+          </a></span></dt><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html#QpidTroubleshootingGuide-Ican-27tgetthebrokertostart.HowcanIdiagnosetheproblem-3F">1.4.4. 
+            I can't get the broker to start. How can I diagnose the
+            problem ?
+          </a></span></dt><dt><span class="section"><a href="Qpid-Troubleshooting-Guide.html#QpidTroubleshootingGuide-WhenItrytosendmessagestoaqueueI-27mgettingaerrorasthequeuedoesnotexist.WhatcanIdo-3F">1.4.5. 
+            When I try to send messages to a queue I'm getting a error as
+            the queue does not exist. What can I do ?
+          </a></span></dt></dl></dd><dt><span class="section"><a href="Java-Broker-Configuration-Guide.html">1.5. Broker Configuration Guide </a></span></dt><dd><dl><dt><span class="section"><a href="Java-Broker-Configuration-Guide.html#Qpid-Producer-Flow-Control">1.5.1. Producer Flow Control</a></span></dt><dt><span class="section"><a href="Java-Broker-Configuration-Guide.html#id2494910">1.5.2. Topic Configuration on Java Broker</a></span></dt></dl></dd><dt><span class="section"><a href="High-Availability.html">1.6. High Availability</a></span></dt><dd><dl><dt><span class="section"><a href="High-Availability.html#HAGeneralIntroduction">1.6.1. General Introduction</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAOfferingsOfJavaBroker">1.6.2. HA offerings of the Java Broker</a></span></dt><dt><span class="section"><a href="High-Availability.html#HATwoNodeCluster">1.6.3. Two Node Cluster</a></span></dt><dt><span class="section"><a href="High-Availabil
 ity.html#HAMultiNodeCluster">1.6.4. Multi Node Cluster</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAConfiguration">1.6.5. Configuring a Virtual Host to be a node</a></span></dt><dt><span class="section"><a href="High-Availability.html#HADurabilityGuarantee">1.6.6. Durability Guarantees</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAClientFailover">1.6.7. Client failover configuration</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAJMXAPI">1.6.8. Qpid JMX API for HA</a></span></dt><dt><span class="section"><a href="High-Availability.html#BDB-HA-Monitoring-cluster">1.6.9. Monitoring cluster</a></span></dt><dt><span class="section"><a href="High-Availability.html#HADiskSpace">1.6.10. Disk space requirements</a></span></dt><dt><span class="section"><a href="High-Availability.html#BDB-HA-Network-Requirements">1.6.11. Network Requirements</a></span></dt><dt><span class="section"><a href="High-Avai
 lability.html#BDB-HA-Security">1.6.12. Security</a></span></dt><dt><span class="section"><a href="High-Availability.html#BDB-HA-Backup">1.6.13. Backups</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAMigrationFromNonHA">1.6.14. Migration of a non-HA store to HA</a></span></dt><dt><span class="section"><a href="High-Availability.html#HADisasterRecovery">1.6.15. Disaster Recovery</a></span></dt><dt><span class="section"><a href="High-Availability.html#HAPerformance">1.6.16. Performance</a></span></dt></dl></dd></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id2492438"></a>1.1. 
+      Java Broker Feature Guide
+    </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="JavaBrokerFeatureGuide-TheQpidpureJavabrokercurrentlysupportsthefollowingfeatures-3A"></a>1.1.1. 
+            The Qpid pure Java broker currently supports the following
+            features:
+          </h3></div></div></div><div class="itemizedlist"><ul><li><p>All features required by the Sun JMS 1.1 specification, fully
+            tested
+            </p></li><li><p>Transaction support
+            </p></li><li><p>Persistence using a pluggable layer
+            </p></li><li><p>Pluggable security using SASL
+            </p></li><li><p>Management using JMX and an Eclipse Management Console
+            application
+            </p></li><li><p>High performance header-based routing for messages
+            </p></li><li><p>Message Priorities
+            </p></li><li><p>Configurable logging and log archiving
+            </p></li><li><p>Threshold alerting
+            </p></li><li><p>ACLs
+            </p></li><li><p>Extensively tested on each release, including performance
+            &amp; reliability testing
+            </p></li><li><p>Automatic client failover using configurable connection
+            properties
+            </p></li><li><p>Durable Queues/Subscriptions
+            </p></li></ul></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="JavaBrokerFeatureGuide-Upcomingfeatures-3A"></a>1.1.1.1. 
+            Upcoming
+            features:
+          </h4></div></div></div><div class="itemizedlist"><ul><li><p>Flow To Disk
+            </p></li><li><p>IP Whitelist
+            </p></li><li><p>AMQP 0-10 Support (for interoperability)
+            </p></li></ul></div></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pr01.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Qpid-Java-FAQ.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Introduction </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 1.2. 
+      Qpid Java FAQ
+    </td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Added: qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Priority-Queues.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Priority-Queues.html?rev=1372179&view=auto
==============================================================================
--- qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Priority-Queues.html (added)
+++ qpid/site/docs/books/0.18/AMQP-Messaging-Broker-Java-Book/html/Priority-Queues.html Sun Aug 12 19:03:49 2012
@@ -0,0 +1,96 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>2.10.  Use Priority Queues</title><link rel="stylesheet" href="css/style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="AMQP Messaging Broker (Implemented in Java)"><link rel="up" href="Qpid-Java-Broker-HowTos.html" title="Chapter 2. How Tos"><link rel="prev" href="Qpid-Java-Build-HowTo.html" title="2.9.  Qpid Java Build How To"><link rel="next" href="Java-Broker-Slow-Consumer-Disconnect.html" title="2.11. Slow Consumer Disconnect - User Guide"></head><body><div class="container" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><DIV class="header"><DIV class="logo"><H1>Apache Qpid™</H1><H2>Open Source AMQP Messaging</H2></DIV></DIV><DIV class="menu_box"><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Apache Qpid</H3><UL><LI><A href="http://qpid.apac
 he.org/index.html">Home</A></LI><LI><A href="http://qpid.apache.org/download.html">Download</A></LI><LI><A href="http://qpid.apache.org/getting_started.html">Getting Started</A></LI><LI><A href="http://www.apache.org/licenses/">License</A></LI><LI><A href="https://cwiki.apache.org/qpid/faq.html">FAQ</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Documentation</H3><UL><LI><A href="http://qpid.apache.org/documentation.html#doc-release">0.14 Release</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-trunk">Trunk</A></LI><LI><A href="http://qpid.apache.org/documentation.html#doc-archives">Archive</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Community</H3><UL><LI><A href="http://qpid.apache.org/getting_involved.html">Getting Involved</A></LI><LI><A href="http://qpid.apache.org/source_repository.html">Source Repository</A></L
 I><LI><A href="http://qpid.apache.org/mailing_lists.html">Mailing Lists</A></LI><LI><A href="https://cwiki.apache.org/qpid/">Wiki</A></LI><LI><A href="https://issues.apache.org/jira/browse/qpid">Issue Reporting</A></LI><LI><A href="http://qpid.apache.org/people.html">People</A></LI><LI><A href="http://qpid.apache.org/acknowledgements.html">Acknowledgements</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>Developers</H3><UL><LI><A href="https://cwiki.apache.org/qpid/building.html">Building Qpid</A></LI><LI><A href="https://cwiki.apache.org/qpid/developer-pages.html">Developer Pages</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About AMQP</H3><UL><LI><A href="http://qpid.apache.org/amqp.html">What is AMQP?</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV><DIV class="menu_box_top"></DIV><DIV class="menu_box_body"><H3>About Apache</H3><U
 L><LI><A href="http://www.apache.org">Home</A></LI><LI><A href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</A></LI><LI><A href="http://www.apache.org/foundation/thanks.html">Thanks</A></LI><LI><A href="http://www.apache.org/security/">Security</A></LI></UL></DIV><DIV class="menu_box_bottom"></DIV></DIV><div class="main_text_area"><div class="main_text_area_top"></div><div class="main_text_area_body"><DIV class="breadcrumbs"><span class="breadcrumb-link"><a href="index.html">AMQP Messaging Broker (Implemented in Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Qpid-Java-Broker-HowTos.html">How Tos</a></span> &gt; <span class="breadcrumb-node">
+      Use Priority Queues
+    </span></DIV><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Priority-Queues"></a>2.10. 
+      Use Priority Queues
+    </h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="UsePriorityQueues-GeneralInformation"></a>2.10.1. 
+            General
+            Information
+          </h3></div></div></div><p>
+            The Qpid M3 release introduces priority queues into the Java
+            Messaging Broker, supporting JMS clients who wish to make use of
+            priorities in their messaging implementation.
+          </p><p>
+            There are some key points around the use of priority queues in
+            Qpid, discussed in the sections below.
+          </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="UsePriorityQueues-DefiningPriorityQueues"></a>2.10.2. 
+            Defining
+            Priority Queues
+          </h3></div></div></div><p>
+            You must define a priority queue specifically before you start to
+            use it. You cannot subsequently change a queue to/from a priority
+            queue (without deleting it and re-creating).
+          </p><p>
+            You define a queue as a priority queue in the virtualhost
+            configuration file, which the broker loads at startup. When
+            defining the queue, add a &lt;priority&gt;true&lt;/priority&gt;
+            element. This will ensure that the queue has 10 distinct
+            priorities, which is the number supported by JMS.
+          </p><p>
+            If you require fewer priorities, it is possible to specify a
+            &lt;priorities&gt;int&lt;/priorities&gt; element (where int is a
+            valid integer value between 2 and 10 inclusive) which will give
+            the queue that number of distinct priorities. When messages are
+            sent to that queue, their effective priority will be calculated
+            by partitioning the priority space. If the number of effective
+            priorities is 2, then messages with priority 0-4 are treated the
+            same as "lower priority" and messages with priority 5-9 are
+            treated equivalently as "higher priority".
+          </p><pre class="programlisting">
+&lt;queue&gt;
+    &lt;name&gt;test&lt;/name&gt;
+    &lt;test&gt;
+        &lt;exchange&gt;amq.direct&lt;/exchange&gt;
+        &lt;priority&gt;true&lt;/priority&gt;
+    &lt;/test&gt;
+&lt;/queue&gt;
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="UsePriorityQueues-Clientconfiguration-2Fmessagingmodelforpriorityqueues"></a>2.10.3. 
+            Client configuration/messaging model for priority queues
+          </h3></div></div></div><p>
+            There are some other configuration &amp; paradigm changes which
+            are required in order that priority queues work as expected.
+          </p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="UsePriorityQueues-Setlowprefetch"></a>2.10.3.1. 
+            Set low pre-fetch
+          </h4></div></div></div><p>
+            Qpid clients receive buffered messages in batches, sized
+            according to the pre-fetch value. The current default is 5000.
+          </p><p>
+            However, if you use the default value you will probably
+            <span class="emphasis"><em>not</em></span> see desirable behaviour with messages of different
+            priority. This is because a message arriving after the pre-fetch
+            buffer has filled will not leap frog messages of lower priority.
+            It will be delivered at the front of the next batch of buffered
+            messages (if that is appropriate), but this is most likely NOT
+            what you need.
+          </p><p>
+            So, you need to set the prefetch values for your client
+            (consumer) to make this sensible. To do this set the java system
+            property max_prefetch on the client environment (using -D) before
+            creating your consumer.
+          </p><p>
+            Setting the Qpid pre-fetch to 1 for your client means that
+            message priority will be honoured by the Qpid broker as it
+            dispatches messages to your client. A default for all client
+            connections can be set via a system property:
+          </p><pre class="programlisting">
+-Dmax_prefetch=1
+</pre><p>
+            The prefetch can be also be adjusted on a per connection basis by
+            adding a 'maxprefetch' value to the <a class="xref" href="">???</a>
+          </p><pre class="programlisting">
+amqp://guest:guest@client1/development?maxprefetch='1'&amp;brokerlist='tcp://localhost:5672'
+</pre><p>
+            There is a slight performance cost here if using the receive()
+            method and you could test with a slightly higher pre-fetch (up to
+            10) if the trade-off between throughput and prioritisation is
+            weighted towards the former for your application. (If you're
+            using OnMessage() then this is not a concern.)
+          </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="UsePriorityQueues-Singleconsumerpersession"></a>2.10.3.2. 
+            Single
+            consumer per session
+          </h4></div></div></div><p>
+            If you are using the receive() method to consume messages then
+            you should also only use one consumer per session with priority
+            queues. If you're using OnMessage() then this is not a concern.
+          </p></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Qpid-Java-Build-HowTo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Qpid-Java-Broker-HowTos.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Slow-Consumer-Disconnect.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.9. 
+      Qpid Java Build How To
+     </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.11. Slow Consumer Disconnect - User Guide</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>



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