summaryrefslogtreecommitdiff
path: root/qpid/doc
diff options
context:
space:
mode:
authorAndrew Donald Kennedy <grkvlt@apache.org>2010-12-07 02:16:22 +0000
committerAndrew Donald Kennedy <grkvlt@apache.org>2010-12-07 02:16:22 +0000
commit73140680684872939df955e36f3f2ec2b134dd7e (patch)
tree7105303d07423173d14bf6610fb795ceeefaf626 /qpid/doc
parentdbbd5f5f42a32d084e8dfc82806fd3e29dd9a143 (diff)
downloadqpid-python-73140680684872939df955e36f3f2ec2b134dd7e.tar.gz
QPID-2680: Tidied up docbook formatting
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1042890 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/doc')
-rw-r--r--qpid/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml372
1 files changed, 91 insertions, 281 deletions
diff --git a/qpid/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml b/qpid/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml
index 4d5bad73a3..5f4c627430 100644
--- a/qpid/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml
+++ b/qpid/doc/book/src/How-to-Use-SlowConsumerDisconnect.xml
@@ -26,143 +26,75 @@
<section>
<title>Introduction</title>
- <para>
-
- </para>
-
<para>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. </para>
- <para>
-
- </para>
-
<para>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. </para>
- <para>
-
- </para>
-
<para>Cases where a consumer is 'slow' can arise due to one of the following: poor network
- connectivity exists; a transitory system issue affects a single client;a single subscriber
+ 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. </para>
- <para>
-
- </para>
-
<para>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. </para>
- <para>
-
- </para>
-
</section>
<section>
<title>What can it do?</title>
- <para>
-
- </para>
-
- <para>SCD is only applicable to topics and durable subscriptions and can be configured on either
- topic or a subscription name. </para>
-
- <para>
-
- </para>
+ <para>SCD is only applicable to topics or durable subscriptions and can be configured on either
+ a topic or a subscription name. </para>
<para>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. </para>
- <para>Note that it is essential that an ExceptionListener be specified by the client on
+
+ <para>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. </para>
- <para>
-
- </para>
-
</section>
<section>
<title>Frequency of SCD Checking</title>
- <para>
-
- </para>
-
<section>
<title><emphasis role='bold'>Configuring Frequency</emphasis></title>
- <para>
-
- </para>
-
<para>You can configure the frequency with which the SCD process will check for slow consumers,
- along with the unit of time you're using to specify that frequency. </para>
-
- <para>
-
- </para>
-
- <para><emphasis role="italic">virtualhosts.virtualhost.slow-consumer-detection. delay</emphasis>
- and <emphasis role="italic">.timeunit</emphasis> are the elements used to specify the
- frequency and timeunit for that frequency on the virtualhosts.xml file e.g. </para>
-
- <para> </para>
-
- <para> &lt;virtualhosts></para>
-
- <para> &lt;default&gt;test&lt;/default&gt; </para>
-
- <para> &lt;virtualhost&gt; </para>
-
- <para> &lt;name&gt;test&lt;/name&gt; </para>
-
- <para> &lt;test&gt; </para>
-
- <para> &lt;slow-consumer-detection&gt; </para>
-
- <para> &lt;delay&gt;60&lt;delay/&gt; </para>
-
- <para> &lt;timeunit&gt;seconds&lt;timeunit/&gt; </para>
-
- <para> &lt;slow-consumer-detection/&gt; </para>
-
- <para> &lt;/test&gt; </para>
-
- <para> &lt;/virtualhost&gt; </para>
-
- <para>
+ along with the unit of time used to specify that frequency. </para>
+
+ <para>The <emphasis role="italic">virtualhosts.virtualhost.hostname.slow-consumer-detection</emphasis>
+ elements <emphasis role="italic">delay</emphasis> and <emphasis role="italic">timeunit</emphasis>
+ are used to specify the frequency and timeunit respectively in the virtualhosts.xml
+ file e.g. </para>
+
+<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;
- </para>
-
- <para>
-
- </para>
+</programlisting>
</section>
<section>
<title><emphasis role='bold'>SCD Log output</emphasis></title>
- <para>
-
- </para>
-
- <para>
-When the SCD component finds a queue with a configured threshold to check, the operational logging component (if enabled) will log:
- </para>
+ <para>When the SCD component finds a queue with a configured threshold to check, the operational
+ logging component (if enabled) will output the following line:</para>
- <para>
-SCD-1003 : Checking Status of Queue
- </para>
-
- <para>
-
- </para>
+ <programlisting>
+ SCD-1003 : Checking Status of Queue
+ </programlisting>
</section>
@@ -173,112 +105,38 @@ SCD-1003 : Checking Status of Queue
<para>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:</para>
- <para> </para>
-
- <para>
-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
- </para>
-
- <para>
+<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
- </para>
-
- <para>
-:org.apache.qpid.AMQChannelClosedException: Error: Consuming to slow. /[error code 506: resource error/]
- </para>
-
- <para>
+ :org.apache.qpid.AMQChannelClosedException: Error: Consuming to slow. [error code 506: resource error]
javax.jms.JMSException: 506
- </para>
-
- <para>
- at org.apache.qpid.client.AMQConnection.exceptionReceived(AMQConnection.java:1396)
- </para>
-
- <para>
- at org.apache.qpid.client.protocol.AMQProtocolHandler.exception(AMQProtocolHandler.java:329)
- </para>
-
- <para>
- at org.apache.qpid.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:536)
- </para>
-
- <para>
- at org.apache.qpid.client.protocol.AMQProtocolSession.methodFrameReceived(AMQProtocolSession.java:453)
- </para>
-
- <para>
- at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
- </para>
-
- <para>
- at org.apache.qpid.client.protocol.AMQProtocolHandler$1.run(AMQProtocolHandler.java:462)
- </para>
-
- <para>
- at org.apache.qpid.pool.Job.processAll(Job.java:110)
- </para>
-
- <para>
- at org.apache.qpid.pool.Job.run(Job.java:149)
- </para>
-
- <para>
- at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
- </para>
-
- <para>
- at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
- </para>
-
- <para>
- at java.lang.Thread.run(Thread.java:619)
- </para>
-
- <para>
-Caused by: org.apache.qpid.AMQChannelClosedException: Error: Consuming to slow. /[error code 506: resource error/]
- </para>
-
- <para>
- at org.apache.qpid.client.handler.ChannelCloseMethodHandler.methodReceived(ChannelCloseMethodHandler.java:96)
- </para>
-
- <para>
- at org.apache.qpid.client.handler.ClientMethodDispatcherImpl.dispatchChannelClose(ClientMethodDispatcherImpl.java:163)
- </para>
-
- <para>
- at org.apache.qpid.framing.amqp_8_0.ChannelCloseBodyImpl.execute(ChannelCloseBodyImpl.java:140)
- </para>
-
- <para>
- at org.apache.qpid.client.state.AMQStateManager.methodReceived(AMQStateManager.java:112)
- </para>
-
- <para>
- at org.apache.qpid.client.protocol.AMQProtocolHandler.methodBodyReceived(AMQProtocolHandler.java:511)
- </para>
-
- <para>
- ... 8 more
- </para>
-
- <para>
-main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing session: org.apache.qpid.client.AMQSession_0_8@ffeef1
- </para>
-
- <para>
-
- </para>
+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
+</programlisting>
</section>
<section>
<title>Disconnection Thresholds</title>
- <para>
-
- </para>
-
<section>
<title>Topic Subscriptions</title>
<para>One key feature of SCD is the disconnection of a consuming client when a specified
@@ -286,10 +144,6 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
longer be delivered to the private queue which was associated with that consuming client,
thus reducing any associated backlog in the broker. </para>
- <para>
-
- </para>
-
</section>
<section>
@@ -304,10 +158,6 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
<para>Full details of how to configure the thresholds are provided below. </para>
- <para>
-
- </para>
-
</section>
<section>
@@ -324,10 +174,6 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
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. </para>
- <para>
-
- </para>
-
</section>
<section>
@@ -335,10 +181,6 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
<para>You can use the message count for the consumer's queue as the trigger, where a count
higher than that specified will trigger disconnection. </para>
- <para>
-
- </para>
-
</section>
<section>
@@ -350,8 +192,8 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
<emphasis role='bold'>Delete Temporary Queues Only</emphasis>
</para>
- <para>If you do not specify a topicDelete element in your configuration, then only temporary
- queues associated with a topic subscription will be delete on client disconnect. This is
+ <para>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. </para>
<para/>
@@ -376,21 +218,20 @@ main 2010-09-01 16:23:34,316 INFO /[apache.qpid.client.AMQSession/] Closing sess
The following steps are required to configure SCD:
</para>
- <para>
-- enable SCD checking for your virtual host
- </para>
-
- <para>
-- specify frequency for SCD checking
- </para>
-
- <para>
-- define thresholds for the topic
- </para>
-
- <para>
-- define the policy to apply on trigger
- </para>
+<itemizedlist>
+ <listitem>
+ <para>Enable SCD checking for your virtual host</para>
+ </listitem>
+ <listitem>
+ <para>Specify frequency for SCD checking</para>
+ </listitem>
+ <listitem>
+ <para>Define thresholds for the topic</para>
+ </listitem>
+ <listitem>
+ <para>Define the policy to apply on trigger </para>
+ </listitem>
+</itemizedlist>
<para>The example below shows a simple definition, with all three thresholds specified and a
simple disconnection, with deletion of any temporary queue, defined. </para>
@@ -398,36 +239,26 @@ The following steps are required to configure SCD:
<para>For a durable subscription to this topic, no queue deletion would be applied on disconnect
- which is likely to be undesirable (see section above). </para>
- <para>&lt;topics&gt; </para>
-
- <para> &lt;topic&gt; </para>
-
- <para> &lt;name&gt;stocks.us.*&lt;/name&gt; </para>
-
- <para> &lt;slow-consumer-detection&gt; </para>
-
- <para> &lt;!-- The maximum depth before which the policy will be applied--&gt; </para>
-
- <para> &lt;depth&gt;4235264&lt;/depth&gt; </para>
-
- <para> &lt;!-- The maximum message age before which the policy will be applied--&gt; </para>
-
- <para> &lt;messageAge&gt;600000&lt;/messageAge&gt; </para>
-
- <para> &lt;!-- The maximum number of message before which the policy will be
- applied--&gt; </para>
-
- <para> &lt;messageCount&gt;50&lt;/messageCount&gt; </para>
-
- <para> &lt;!-- Policy Selection --&gt; </para>
-
- <para> &lt;policy name="TopicDelete"/&gt; </para>
-
- <para> &lt;/slow-consumer-detection&gt; </para>
-
- <para> &lt;/topic&gt; </para>
-
- <para>&lt;/topics&gt; </para>
+<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;
+</programlisting>
</section>
@@ -439,32 +270,11 @@ The following steps are required to configure SCD:
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. </para>
- <para>
-
- </para>
-
<para>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. </para>
- <para>
-
- </para>
-
- <para>
-
- </para>
-
- <para>
-
- </para>
-
- <para>
-
- </para>
-
</section>
</section>
-