You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2013/10/09 00:56:29 UTC

svn commit: r1530457 [9/30] - in /qpid/site: docs/components/java-broker/book/ docs/components/java-broker/book/images/ input/components/java-broker/book/ input/components/java-broker/book/images/

Modified: qpid/site/docs/components/java-broker/book/Java-Broker-Queues.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/components/java-broker/book/Java-Broker-Queues.html?rev=1530457&r1=1530456&r2=1530457&view=diff
==============================================================================
--- qpid/site/docs/components/java-broker/book/Java-Broker-Queues.html (original)
+++ qpid/site/docs/components/java-broker/book/Java-Broker-Queues.html Tue Oct  8 22:56:26 2013
@@ -1 +1,222 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 7. Queues</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="prev" href="Java-Broker-Exchanges.html" title="Chapter 6. Exchanges"><link rel="next" href="Java-Broker-Queues-OtherTypes.html" title="7.2. Other Queue Types"></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">Latest 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/found
 ation/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 (Java)</a></span> &gt; <span class="breadcrumb-node">Queues</span></DIV><div class="chapter" title="Chapter 7. Queues"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Queues"></a>Chapter 7. Queues</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="Java-Broker-Queues.html#Queues-Messaging-Groups">7.1. Messaging Groups</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html">7.2. Other Queue Types</a></span></dt><dd><dl><dt><span class="secti
 on"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Introduction">7.2.1. Introduction</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Priority">7.2.2. Priority Queues</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Sorted">7.2.3. Sorted Queues</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-LVQ">7.2.4. Last Value Queues (LVQ)</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-Create">7.2.5. Creating a Priority, Sorted or LVQ Queue</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues-OtherTypes.html#Java-Broker-Queues-OtherTypes-SetLowPrefetch">7.2.6. Low pre-fetch</a></span></dt></dl></dd></dl></div><div class="section" title="7.1. Messaging Groups"><div class="titlepage"><div><
 div><h2 class="title"><a name="Queues-Messaging-Groups"></a>7.1. Messaging Groups</h2></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="Java-Broker-Exchanges.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Queues-OtherTypes.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 6. Exchanges </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 7.2. Other Queue Types</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 9. Queues</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="prev" href="Java-Broker-Exchanges.html" title="Chapter 8. Exchanges"><link rel="next" href="Java-Broker-Stores.html" title="Chapter 10. Virtual Host Message Stores"></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">Latest 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 (Java)</a></span> &gt; <span class="breadcrumb-node">Queues</span></DIV><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="Java-Broker-Queues"></a>Chapter 9. Queues</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes">9.1. Queue Types</a></span></dt><dd><dl><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Introduction">9.1.1. Introduction</a></span></dt><dt
 ><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Priority">9.1.2. Priority Queues</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Sorted">9.1.3. Sorted Queues</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-LVQ">9.1.4. Last Value Queues (LVQ)</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Create">9.1.5. Creating a Priority, Sorted or LVQ Queue</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Binding">9.1.6. Binding queues to exchanges</a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Message-Grouping">9.1.7. 
+      Messaging Grouping
+    </a></span></dt><dt><span class="section"><a href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-SetLowPrefetch">9.1.8. Using low pre-fetch with special queue types</a></span></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Queues-OtherTypes"></a>9.1. Queue Types</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Introduction"></a>9.1.1. Introduction</h3></div></div></div><p> In addition to the standard queue type where messages are delivered in the same order
+      that they were sent, the Java Broker supports three additional queue types which allows for
+      alternative delivery behaviours. These are
+      <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Priority" title="9.1.2. Priority Queues">priority-queues</a>,
+      <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Sorted" title="9.1.3. Sorted Queues">sorted-queues</a>-,
+      <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-LVQ" title="9.1.4. Last Value Queues (LVQ)">last-value-queues</a> (LVQs).
+      Additionally, Java Broker supports <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-Message-Grouping" title="9.1.7.  Messaging Grouping">message grouping</a>.
+    </p><p> In the following sections, the semantics of each queue type is described, followed by a
+      description of how instances of these queue can be created via <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-CreateUsingConfig" title="9.1.5.3. Using configuration">configuration</a>, <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-CreateUsingJmsOrJmx" title="9.1.5.2. Using JMX or AMQP">programmatically</a> or
+        <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-CreateUsingManagement" title="9.1.5.1. Using Web Management Console">Web Management Console</a>.</p><p>The final section discusses the importance of using a <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-SetLowPrefetch" title="9.1.8. Using low pre-fetch with special queue types">low client pre-fetch</a> with these queued.
+    </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Priority"></a>9.1.2. Priority Queues</h3></div></div></div><p>In a priority queue, messages on the queue are delivered in an order determined by the
+        <a class="ulink" href="http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSPriority()" target="_top">JMS priority message
+        header</a> within the message. By default Qpid supports the 10 priority levels mandated
+      by JMS, with priority value 0 as the lowest priority and 9 as the highest. </p><p>It is possible to reduce the effective number of priorities if desired.</p><p>JMS defines the <a class="ulink" href="http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#DEFAULT_PRIORITY" target="_top">
+        default message priority</a> as 4. Messages sent without a specified priority use this
+      default. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Sorted"></a>9.1.3. Sorted Queues</h3></div></div></div><p>Sorted queues allow the message delivery order to be determined by value of an arbitrary
+        <a class="ulink" href="http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getStringProperty()" target="_top">JMS message
+        property</a>. Sort order is alpha-numeric and the property value must have a type
+      java.lang.String.</p><p>Messages sent to a sorted queue without the specified JMS message property will be
+      inserted into the 'last' position in the queue.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-LVQ"></a>9.1.4. Last Value Queues (LVQ)</h3></div></div></div><p>LVQs (or conflation queues) are special queues that automatically discard any message when
+      a newer message arrives with the same key value. The key is specified by arbitrary <a class="ulink" href="http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getPropertyNames()" target="_top">JMS message
+        property</a>.</p><p>An example of an LVQ might be where a queue represents prices on a stock exchange: when
+      you first consume from the queue you get the latest quote for each stock, and then as new
+      prices come in you are sent only these updates. </p><p>Like other queues, LVQs can either be browsed or consumed from. When browsing an
+      individual subscriber does not remove the message from the queue when receiving it. This
+      allows for many subscriptions to browse the same LVQ (i.e. you do not need to create and bind
+      a separate LVQ for each subscriber who wishes to receive the contents of the LVQ).</p><p>Messages sent to an LVQ without the specified property will be delivered as normal and
+      will never be "replaced".</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Create"></a>9.1.5. Creating a Priority, Sorted or LVQ Queue</h3></div></div></div><p>To create a priority, sorted or LVQ queue, it can be defined in the virtualhost
+      configuration file, can be created programmtically from a client via AMQP (using
+      an extension to JMS), using JMX, using REST interfaces or created in Web Management Console.
+      These methods are described below. </p><p>Once a queue is created you cannot change its type (without deleting it and re-creating).
+      Also note you cannot currently mix the natures of these queue types, for instance, you cannot
+      define a queue which it both an LVQ and a priority-queue.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-CreateUsingManagement"></a>9.1.5.1. Using Web Management Console</h4></div></div></div><p>On clicking on "Add Queue" button on Virtual Host tab the pop-up dialog to create a queue is displayed.</p><p>For a Simple queue a Queue Type "Standard" should be selected</p><p>For a Priority queue a Queue Type "Priority" and the priority value (10 by default) should be selected.</p><p>For a Sorted queue a Queue Type "Sorted" and Sort Message Property should be specified.</p><p>For a LVQ queue a Queue Type "LVQ" and LVQ Message Property should be specified.</p><p>Additionally, for each type of the queue Flow Control Thresholds and Alert Thresholds can be specified in optional fields.</p><p>Also, a Dead Letter Queue can be configured for the Queue by checking "Create DLQ" check box.
+      The maximum number of delivery retries before message is sent to the DLQ can be specified in "Maximum Delivery Retries" field.
+      However, configuring of maximum delivery retries on a queue without DLQ(AlternateExchange) will result in messages
+      being discarded after the limit is reached.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-CreateUsingJmsOrJmx"></a>9.1.5.2. Using JMX or AMQP</h4></div></div></div><p>To create a priority, sorted or LVQ queue programmatically from JMX or using a Qpid
+        extension to JMS, pass the appropriate queue-declare arguments.</p><div class="table"><a name="idp7151312"></a><p class="title"><b>Table 9.1. Queue-declare arguments understood for priority, sorted and LVQ queues</b></p><div class="table-contents"><table summary="Queue-declare arguments understood for priority, sorted and LVQ queues" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Queue type</th><th>Argument name</th><th>Argument name</th><th>Argument Description</th></tr></thead><tbody><tr><td>priority</td><td>x-qpid-priorities</td><td>java.lang.Integer</td><td>Specifies a priority queue with given number priorities</td></tr><tr><td>sorted</td><td>qpid.queue_sort_key</td><td>java.lang.String</td><td>Specifies sorted queue with given message property used to sort the
+                entries</td></tr><tr><td>lvq</td><td>qpid.last_value_queue_key</td><td>java.lang.String</td><td>Specifies lvq queue with given message property used to conflate the
+                entries</td></tr></tbody></table></div></div><br class="table-break"><p>The following example illustrates the creation of the a LVQ queue from a
+        javax.jms.Session object. Note that this utilises a Qpid specific extension to JMS and
+        involves casting the session object back to its Qpid base-class.</p><div class="example"><a name="idp7162112"></a><p class="title"><b>Example 9.1. Creation of an LVQ using the Qpid extension to JMS</b></p><div class="example-contents"><pre class="programlisting">Map&lt;String,Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+arguments.put("qpid.last_value_queue_key","ISIN");
+AMQDestination amqQueue = (AMQDestination) context.lookup("myqueue");
+((AMQSession&lt;?,?&gt;) session).createQueue(
+        AMQShortString.valueOf(amqQueue.getQueueName()),
+        amqQueue.isAutoDelete(),
+        amqQueue.isDurable(),
+        amqQueue.isExclusive(),
+        arguments);
+</pre></div></div><br class="example-break"><p> The following example illustrates the creation of the sorted queue from a the JMX
+        interface using the ManagedBroker interface. </p><div class="example"><a name="idp7164256"></a><p class="title"><b>Example 9.2. Creation of a sorted queue using JMX</b></p><div class="example-contents"><pre class="programlisting">Map&lt;String, Object&gt; environment = new HashMap&lt;String, Object&gt;();
+environment.put(JMXConnector.CREDENTIALS, new String[] {"admin","password"});
+// Connect to service
+JMXServiceURL url =  new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi");
+JMXConnector jmxConnector = JMXConnectorFactory.connect(url, environment);
+MBeanServerConnection mbsc =  jmxConnector.getMBeanServerConnection();
+// Object name for ManagedBroker for virtualhost myvhost
+ObjectName objectName = new ObjectName("org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=myvhost");
+// Get the ManagedBroker object
+ManagedBroker managedBroker = JMX.newMBeanProxy(mbsc, objectName, ManagedBroker.class);;
+
+// Create the queue passing arguments
+Map&lt;String,Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+arguments.put("qpid.queue_sort_key","myheader");
+managedBroker.createNewQueue("myqueue", null, true, arguments);</pre></div></div><br class="example-break"></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-CreateUsingConfig"></a>9.1.5.3. Using configuration</h4></div></div></div><p>How to declare queues in the Virtual Host configuration file is described in <a class="xref" href="Java-Broker-Virtual-Host-Declare-Queues.html" title="14.9. Configuring Queues">Section 14.9, “Configuring Queues”</a>.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Binding"></a>9.1.6. Binding queues to exchanges</h3></div></div></div><p>Queues can be bound to the broker exchanges in the virtualhost
+      configuration file or programmtically from a client using AMQP bind API (using
+      an extension to JMS), using JMX API, using REST interfaces or Web Management Console.</p><p>A queue can be bound to different exchanges at the same time.
+    Also, a queue can be bound to the same exchange multiple times.
+    Differenent binding keys can be used to bind a queue to the same topic or direct exchanges.</p><p>Binding attributes can be specified on binding creation to allow filtering of messages accepted by the queue using a selector expression
+    or/and specifying whether messages published by its own connection should be delivered to it.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-BindingUsingManagement"></a>9.1.6.1. Using Web Management Console</h4></div></div></div><p>A queue can be bound to an exchange by clicking on "Add Binding" button on a Queue tab or an Exchange tab.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-BindingUsingJmsOrJmx"></a>9.1.6.2. Using JMX or AMQP</h4></div></div></div><p>The following example illustrates the creation of queue binding to topic exchange with JMS client.</p><div class="example"><a name="idp7175328"></a><p class="title"><b>Example 9.3. Binding a queue using JMS</b></p><div class="example-contents"><pre class="programlisting">ConnectionFactory connectionFactory = ...
+Connection connection = connectionFactory.createConnection();
+AMQSession&lt;?, ?&gt; session = (AMQSession&lt;?,?&gt;)connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+...
+
+AMQShortString queueName = new AMQShortString("testQueue");
+AMQShortString routingKey = new AMQShortString("testRoutingKey");
+AMQDestination destination = (AMQDestination) session.createQueue(queueName.asString());
+
+...
+
+// binding arguments
+Map&lt;String, Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+arguments.put("x-filter-jms-selector", "application='app1'");
+
+// create binding
+session.bindQueue(queueName, routingKey, FieldTable.convertToFieldTable(arguments),
+    new AMQShortString("amq.topic"), destination);</pre></div></div><br class="example-break"><p> The following example illustrates the creation of queue binding to topic exchange with JMX
+        interface using the ManagedExchange interface. </p><div class="example"><a name="idp7177760"></a><p class="title"><b>Example 9.4. Binding a queue using JMX</b></p><div class="example-contents"><pre class="programlisting">Map&lt;String, Object&gt; environment = new HashMap&lt;String, Object&gt;();
+environment.put(JMXConnector.CREDENTIALS, new String[] {"admin","password"});
+
+// Connect to service
+JMXServiceURL url =  new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi");
+JMXConnector jmxConnector = JMXConnectorFactory.connect(url, environment);
+MBeanServerConnection mbsc =  jmxConnector.getMBeanServerConnection();
+
+// Object name for topic Exchange MBean for virtualhost 'default'
+ObjectName objectName = new ObjectName("org.apache.qpid:type=VirtualHost.Exchange,"
+    + "VirtualHost=\"default\",name=\"amq.topic\",ExchangeType=topic");
+
+// Get the ManagedExchange object
+ManagedExchange topicExchange = JMX.newMBeanProxy(mbsc, objectName, ManagedExchange.class);;
+
+// Create the binding arguments
+Map&lt;String,Object&gt; arguments = new HashMap&lt;String, Object&gt;();
+arguments.put("x-filter-jms-selector", "application='app1'");
+
+// create binding
+topicExchange.createNewBinding("queue", "testBindingKey", arguments);</pre></div></div><br class="example-break"></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-BindingUsingConfig"></a>9.1.6.3. Using configuration</h4></div></div></div><p>How to bind queues in the Virtual Host configuration file is shown in <a class="xref" href="Java-Broker-Virtual-Host-Binding-Queue.html" title="14.10. Queue Binding">Section 14.10, “Queue Binding”</a>.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-Message-Grouping"></a>9.1.7. 
+      Messaging Grouping
+    </h3></div></div></div><p>
+      The broker allows messaging applications to classify a set of related messages as
+      belonging to a group.  This allows a message producer to indicate to the consumer
+      that a group of messages should be considered a single logical operation with
+      respect to the application.
+    </p><p>
+      The broker can use this group identification to enforce policies controlling how
+      messages from a given group can be distributed to consumers.  For instance, the
+      broker can be configured to guarantee all the messages from a particular group are
+      processed in order across multiple consumers.
+    </p><p>
+      For example, assume we have a shopping application that manages items in a virtual
+      shopping cart.  A user may add an item to their shopping cart, then change their
+      mind and remove it.  If the application sends an <span class="emphasis"><em>add</em></span> message to the broker,
+      immediately followed by a <span class="emphasis"><em>remove</em></span> message, they will be queued in the proper
+      order - <span class="emphasis"><em>add</em></span>, followed by <span class="emphasis"><em>remove</em></span>.
+    </p><p>
+      However, if there are multiple consumers, it is possible that once a consumer
+      acquires the <span class="emphasis"><em>add</em></span> message, a different consumer may acquire the
+      <span class="emphasis"><em>remove</em></span> message.  This allows both messages to be processed in parallel,
+      which could result in a "race" where the <span class="emphasis"><em>remove</em></span> operation is incorrectly
+      performed before the <span class="emphasis"><em>add</em></span> operation.
+    </p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-GroupingMessages"></a>9.1.7.1. 
+        Grouping Messages
+      </h4></div></div></div><p>
+        In order to group messages, the application would designate a particular
+        message header as containing a message's <span class="emphasis"><em>group identifier</em></span>.  The group
+        identifier stored in that header field would be a string value set by the message
+        producer.  Messages from the same group would have the same group identifier
+        value. The key that identifies the header must also be known to the message
+        consumers.  This allows the consumers to determine a message's assigned group.
+      </p><p>
+        The header that is used to hold the group identifier, as well as the values used
+        as group identifiers, are totally under control of the application.
+      </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-BrokerRole"></a>9.1.7.2. 
+        The Role of the Broker in Message Grouping
+      </h4></div></div></div><p>
+        The broker will apply the following processing on each grouped message:
+        </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">Enqueue a received message on the destination queue.</li><li class="listitem">Determine the message's group by examining the message's group identifier header.</li><li class="listitem">Enforce <span class="emphasis"><em>consumption ordering</em></span> among messages belonging
+          to the same group. <span class="emphasis"><em>Consumption ordering</em></span> means one of two things
+          depending on how the queue has been configured.
+            <div class="itemizedlist"><ul class="itemizedlist" type="circle"><li class="listitem">In default mode, each group is assigned to a consumer for
+              the lifetime of the consumer.</li><li class="listitem">In C++ compatibility mode (which gives the same behaviour
+              as the C++ Qpid Broker), the Broker enforces a looser guarantee, nameley that all the
+              <span class="emphasis"><em>currently unacknowledged messages</em></span> in a group will be sent to the
+              same consumer.  This means that only one consumer can be processing messages from a particular
+              group at a given time.  When the consumer acknowledges all of its acquired
+              messages, then the broker <span class="emphasis"><em>may</em></span> pass the next pending message
+              from that group to a different consumer.</li></ul></div></li></ul></div><p>
+      </p><p>
+        The absence of a value in the designated header field for grouping as treated as indicative
+        of a lack of desire for the message to be grouped. Messages with such a lack of a value will
+        be distributed to any available consumer.
+      </p><p>
+        Note that message grouping has no effect on queue browsers.
+      </p><p>
+        Note well that distinct message groups would not block each other from delivery.
+        For example, assume a queue contains messages from two different message groups -
+        say group "A" and group "B" - and they are enqueued such that "A"'s messages are
+        in front of "B". If the first message of group "A" is in the process of being
+        consumed by a client, then the remaining "A" messages are blocked, but the
+        messages of the "B" group are available for consumption by other consumers - even
+        though it is "behind" group "A" in the queue.
+      </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Queues-OtherTypes-BrokerConfig"></a>9.1.7.3. 
+        Broker Message Grouping Configuration
+      </h4></div></div></div><p>
+        In order for the broker to determine a message's group, the key for the header
+        that contains the group identifier must be provided to the broker via
+        configuration.  This is done on a per-queue basis, when the queue is first
+        configured.
+      </p><p>
+        This means that message group classification is determined by the message's destination
+        queue.
+      </p><p>
+        Specifically, the queue "holds" the header key that is used to find the message's
+        group identifier.  All messages arriving at the queue are expected to use the same
+        header key for holding the identifer.  Once the message is enqueued, the broker
+        looks up the group identifier in the message's header, and classifies the message
+        by its group.
+      </p><p>
+        Message group support is specified by providing one or more of the following settings
+        in the arguments map that is used when declaring the queue (e.g. when calling
+        <code class="code">AMQSession.createQueue()</code>).
+          </p><div class="table"><a name="idp6909936"></a><p class="title"><b>Table 9.2. Queue Declare Message Group Configuration Arguments</b></p><div class="table-contents"><table summary="Queue Declare Message Group Configuration Arguments" border="1"><colgroup><col><col></colgroup><thead><tr><th>Key</th><th>Value</th></tr></thead><tbody><tr><td>qpid.group_header_key</td><td>The name of the message header that holds the group identifier value.
+                  The values in this header may be of any supported type (i.e. not just strings).
+                  </td></tr><tr><td>qpid.shared_msg_group</td><td>Provide a value of "1" to switch on
+                  <a class="link" href="Java-Broker-Queues.html#Java-Broker-Queues-OtherTypes-BrokerRole" title="9.1.7.2.  The Role of the Broker in Message Grouping">C++ compatibility mode</a></td></tr></tbody></table></div></div><p><br class="table-break">
+      </p><p>
+        It is important to note that there is no need to provide the actual group
+        identifer values that will be used. The broker learns these values as messages are
+        received.  Also, there is no practical limit - aside from resource limitations -
+        to the number of different groups that the broker can track at run time.
+      </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Java-Broker-Queues-OtherTypes-SetLowPrefetch"></a>9.1.8. Using low pre-fetch with special queue types</h3></div></div></div><p>Qpid clients receive buffered messages in batches, sized according to the pre-fetch value.
+      The current default is 500. </p><p>However, if you use the default value you will probably <span class="emphasis"><em>not</em></span> see
+      desirable behaviour when using priority, sorted, lvq or grouped queues. Once the broker has sent a
+      message to the client its delivery order is then fixed, regardless of the special behaviour of
+      the queue. </p><p>For example, if using a priority queue and a prefetch of 100, and 100 messages arrive with
+      priority 2, the broker will send these messages to the client. If then a new message arrives
+      will priority 1, the broker cannot leap frog messages of lower priority. The priority 1 will
+      be delivered at the front of the next batch of messages to be sent to the client.</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 <code class="varname">max_prefetch</code> on the client
+      environment (using -D) before creating your consumer. </p><p>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
+      <code class="varname">maxprefetch</code> value to the <a class="ulink" href="../../Programming-In-Apache-Qpid/html/QpidJNDI.html#section-jms-connection-url" target="_top">Connection URLs</a>
+    </p><pre class="programlisting">
+amqp://guest:guest@client1/development?maxprefetch='1'&amp;brokerlist='tcp://localhost:5672'
+</pre><p>Setting the Qpid pre-fetch to 1 will give exact queue-type semantics as perceived by the
+      client however, this brings a performance cost. You could test with a slightly higher
+      pre-fetch to trade-off between throughput and exact semantics.</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="Java-Broker-Exchanges.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Stores.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 8. Exchanges </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 10. Virtual Host Message Stores</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Modified: qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Alerts.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Alerts.html?rev=1530457&r1=1530456&r2=1530457&view=diff
==============================================================================
--- qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Alerts.html (original)
+++ qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Alerts.html Tue Oct  8 22:56:26 2013
@@ -1 +1 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>11.2. Alerts</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="Java-Broker-Runtime.html" title="Chapter 11. Runtime"><link rel="prev" href="Java-Broker-Runtime.html" title="Chapter 11. Runtime"><link rel="next" href="Java-Broker-Runtime-Disk-Space-Management.html" title="11.3. Disk Space Management"></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.apa
 che.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">Latest 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 (Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-Broker-Runtime.html">Runtime</a></span> &gt; <span class="breadcrumb-node">Alerts</span></DIV><div class="section" title="11.2. Alerts"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Runtime-Alerts"></a>11.2. Alerts</h2></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="Java-Broker-Runtime.html">Prev</a> </td><td width="20%" align="cente
 r"><a accesskey="u" href="Java-Broker-Runtime.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Runtime-Disk-Space-Management.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 11. Runtime </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 11.3. Disk Space Management</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>12.2. Alerts</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="Java-Broker-Runtime.html" title="Chapter 12. Runtime"><link rel="prev" href="Java-Broker-Runtime.html" title="Chapter 12. Runtime"><link rel="next" href="Java-Broker-Runtime-Disk-Space-Management.html" title="12.3. Disk Space Management"></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.apa
 che.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">Latest 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 (Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-Broker-Runtime.html">Runtime</a></span> &gt; <span class="breadcrumb-node">Alerts</span></DIV><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Runtime-Alerts"></a>12.2. Alerts</h2></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="Java-Broker-Runtime.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href
 ="Java-Broker-Runtime.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Runtime-Disk-Space-Management.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 12. Runtime </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 12.3. Disk Space Management</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>

Modified: qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html
URL: http://svn.apache.org/viewvc/qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html?rev=1530457&r1=1530456&r2=1530457&view=diff
==============================================================================
--- qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html (original)
+++ qpid/site/docs/components/java-broker/book/Java-Broker-Runtime-Disk-Space-Management.html Tue Oct  8 22:56:26 2013
@@ -1,50 +1,23 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>11.3. Disk Space Management</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="Java-Broker-Runtime.html" title="Chapter 11. Runtime"><link rel="prev" href="Java-Broker-Runtime-Alerts.html" title="11.2. Alerts"><link rel="next" href="Java-Broker-Runtime-Producer-Transaction-Timeout.html" title="11.4. Producer Transaction Timeout"></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><L
 I><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">Latest 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/ma
 iling_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 (Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-Broker-Runtime.html">Runtime</a></span> &gt; <span class="breadcrumb-node">Disk Space Management</span></DIV><div class="section" title="11.3. Disk Space Management"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management"></a>11.3. Disk Space Management</h2></div></div></div><div class="section" title="11.3.1. Producer Flow Control"><div class="titlepage"><div><div><h3 class="title"><a name="Qpid-P
 roducer-Flow-Control"></a>11.3.1. Producer Flow Control</h3></div></div></div><div class="section" title="11.3.1.1. General Information"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-GeneralInformation"></a>11.3.1.1. General Information</h4></div></div></div><p>
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>12.3. Disk Space Management</title><link rel="stylesheet" type="text/css" href="css/style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="AMQP Messaging Broker (Java)"><link rel="up" href="Java-Broker-Runtime.html" title="Chapter 12. Runtime"><link rel="prev" href="Java-Broker-Runtime-Alerts.html" title="12.2. Alerts"><link rel="next" href="Java-Broker-Runtime-Producer-Transaction-Timeout.html" title="12.4. Producer Transaction Timeout"></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><L
 I><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">Latest 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/ma
 iling_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 (Java)</a></span> &gt; <span class="breadcrumb-link"><a href="Java-Broker-Runtime.html">Runtime</a></span> &gt; <span class="breadcrumb-node">Disk Space Management</span></DIV><div class="section"><div class="titlepage"><div><div><h2 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management"></a>12.3. Disk Space Management</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Qpid-Producer-Flow-Control"></a>12.3.1. Producer Flow Control</h3></div></div></div
 ><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-GeneralInformation"></a>12.3.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" title="11.3.1.2. Server Configuration"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-ServerConfiguration"></a>11.3.1.2. Server Configuration</h4></div></div></div><div class="section" title="Configuring a Queue to use flow control"><div class="titlepage"><div><div><h5 class="title"><a name="idp399680"></a>Configuring a Queue to use flow control</h5></div></div></div><p>
+        </p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-ServerConfiguration"></a>12.3.1.2. Server Configuration</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idp7613408"></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><div class="example"><a name="idp397696"></a><p class="title"><b>Example 11.1. Configuring a queue depth limit</b></p><div class="example-contents"><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></div></div><p><br class="example-break">
-
-                The default for all queues on a virtual host can also be set
-
-             </p><div class="example"><a name="idp361744"></a><p class="title"><b>Example 11.2. Configuring a default queue depth limit on a virtualhost</b></p><div class="example-contents"><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></div></div><p><br class="example-break">
-
+            </p><p>
+                Examples how to configure flow control in virtual host configuration are provided in
+                <a class="xref" href="Java-Broker-Virtual-Host-Configure-Flow-Control.html" title="14.11. Configuring of Producer Flow Control">Section 14.11, “Configuring of Producer Flow Control”</a>.
+            </p><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" title="Broker Log Messages"><div class="titlepage"><div><div><h6 class="title"><a name="idp816512"></a>Broker Log Messages</h6></div></div></div><p>
+            </p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3>Flow control can be configured globally for all virtual hosts by specifying threshold values for Broker flow control attributes.</div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a name="idp7617536"></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">
@@ -55,7 +28,7 @@ MESSAGE [con:2(guest@anonymous(713889609
 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" title="Disk quota-based flow control"><div class="titlepage"><div><div><h5 class="title"><a name="idp362624"></a>Disk quota-based flow control</h5></div></div></div><p>
+                </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"><div class="titlepage"><div><div><h5 class="title"><a name="idp7679616"></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>
@@ -69,22 +42,14 @@ MESSAGE [con:2(guest@anonymous(713889609
             </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><div class="example"><a name="idp835408"></a><p class="title"><b>Example 11.3. Configuring a limit on a store</b></p><div class="example-contents"><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></div></div><br class="example-break"><p>
+                An example how to configure disk quota-based flow control in virtual host configuration is provided in
+                <a class="xref" href="Java-Broker-Virtual-Host-Configure-Disk-Quotas.html" title="14.12. Configuring of Disk Quota-based Flow Control">Section 14.12, “Configuring of Disk Quota-based Flow Control”</a>.
+            </p><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" title="Broker Log Messages for quota flow control"><div class="titlepage"><div><div><h6 class="title"><a name="idp539840"></a>Broker Log Messages for quota flow control</h6></div></div></div><p>
+            </p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a name="idp7685184"></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
@@ -95,7 +60,7 @@ MESSAGE [con:2(guest@anonymous(713889609
                     </p><pre class="programlisting">
 [vh(/test)/ms(BDBMessageStore)] MST-1009 : Store overfull condition cleared
                     </pre><p>
-                </p></div></div></div><div class="section" title="11.3.1.3. Client impact and configuration"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-ClientImpact"></a>11.3.1.3. Client impact and configuration</h4></div></div></div><p>
+                </p></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Java-Broker-Runtime-Disk-Space-Management-Producer-Flow-Control-ClientImpact"></a>12.3.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.
@@ -127,6 +92,6 @@ WARN   Message send delayed by 10s due t
         </p><pre class="programlisting">
 -Dqpid.flow_control_wait_failure=60000
 -Dqpid.flow_control_wait_notify_period=10000
-        </pre><div class="section" title="Older Clients"><div class="titlepage"><div><div><h5 class="title"><a name="idp350800"></a>Older Clients</h5></div></div></div><p>
+        </pre><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="idp7696032"></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></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Java-Broker-Runtime-Alerts.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-Broker-Runtime.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Runtime-Producer-Transaction-Timeout.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">11.2. Alerts </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 11.4. Producer Transaction Timeout</td></tr></table></div><div class="main_text_area_bottom"></div></div></div></body></html>
+            </p></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="Java-Broker-Runtime-Alerts.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-Broker-Runtime.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Runtime-Producer-Transaction-Timeout.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.2. Alerts </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 12.4. Producer Transaction Timeout</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