qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Qpid > Topic Configuration Design
Date Tue, 06 Jul 2010 08:54:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/21/_/styles/combined.css?spaceKey=qpid&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/qpid/Topic+Configuration+Design">Topic
Configuration Design</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~ritchiem">Martin
Ritchie</a>
    </h4>
        <br/>
                         <h4>Changes (4)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >This approach allows us to simply
use the dotted notation as well as enabling us to validate the xml. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">In
addition to a general name for all subscriptions to a given topic it is possible to define
configuration for a given subscription. <br>{code:xml} <br>    &lt;topic&gt;
<br>        &lt;subscriptionName&gt;clientid:mysubscription&lt;/subscriptionName&gt;
<br>{code} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Currently alerting is picked up from
the global &#39;queues&#39; configuration section. Now that we have a &#39;topic&#39;
section we have the option to add an &#39;alerting&#39; element which can articulate
more clearly the alerting values. This will allow configuration on a per topic basis and remove
the confusion that has arisen from the &#39;maximum*&#39; elements in the &#39;queues&#39;
configuration section. <br>{code:xml} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >        &lt;slow-consumer-detection&gt;
<br>            &lt;!-- The maximum depth before which the policy will be applied--&gt;
<br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&lt;maximumDepth&gt;4235264&lt;/maximumDepth&gt;</span>
<span class="diff-added-words"style="background-color: #dfd;">&lt;depth&gt;4235264&lt;/depth&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>            &lt;!--
The maximum message age before which the policy will be applied--&gt; <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&lt;maximumMessageAge&gt;600000&lt;/maximumMessageAge&gt;</span>
<span class="diff-added-words"style="background-color: #dfd;">&lt;messageAge&gt;600000&lt;/messageAge&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>            &lt;!--
The maximum number of message before which the policy will be applied--&gt; <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">&lt;maximumMessageCount&gt;50&lt;/maximumMessageCount&gt;</span>
<span class="diff-added-words"style="background-color: #dfd;">&lt;messageCount&gt;50&lt;/messageCount&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>            &lt;!--
Policy Selection --&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="TopicConfigurationDesign-TopicConfigurationDesign"></a>Topic
Configuration Design</h2>

<p>Currently we are unable to provide configuration for topics. What follows is a proposal
to augment our configuration to provide a 'topic' section that can be validated.</p>

<p>The first important section is the topic definition. Rather than using dynamically
named elements that we cannot validate we provide an element with the topic name.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
    <span class="code-tag">&lt;topic&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>stocks.us.*<span
class="code-tag">&lt;/name&gt;</span>
</pre>
</div></div>
<p>This approach allows us to simply use the dotted notation as well as enabling us
to validate the xml.</p>

<p>In addition to a general name for all subscriptions to a given topic it is possible
to define configuration for a given subscription.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
    <span class="code-tag">&lt;topic&gt;</span>
        <span class="code-tag">&lt;subscriptionName&gt;</span>clientid:mysubscription<span
class="code-tag">&lt;/subscriptionName&gt;</span>
</pre>
</div></div>

<p>Currently alerting is picked up from the global 'queues' configuration section. Now
that we have a 'topic' section we have the option to add an 'alerting' element which can articulate
more clearly the alerting values. This will allow configuration on a per topic basis and remove
the confusion that has arisen from the 'maximum*' elements in the 'queues' configuration section.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
        <span class="code-tag">&lt;alerting&gt;</span>
            <span class="code-tag">&lt;depth&gt;</span>2117632<span
class="code-tag">&lt;/depth&gt;</span>
            <span class="code-tag">&lt;messageSize&gt;</span>2117632<span
class="code-tag">&lt;/messageSize&gt;</span>
            <span class="code-tag">&lt;messageAge&gt;</span>300000<span
class="code-tag">&lt;/messageAge&gt;</span>
            <span class="code-tag">&lt;messageCount&gt;</span>25<span
class="code-tag">&lt;/messageCount&gt;</span>
        <span class="code-tag">&lt;/alerting&gt;</span>
</pre>
</div></div>

<p>To further clarify the use of existing properties a producer element can be used
to house configuration that defines how producers to this topic are to be treated. This currently
means the <a href="/confluence/display/qpid/Producer+flow+control" title="Producer flow
control">Producer flow control</a> options but it does give some additional clarity
to the 'capacity' element that is also mistaken to be a hard limit on the capacity of the
queue.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
        <span class="code-tag">&lt;producer&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- set
the topic capacity to 10Mb --&gt;</span></span>
            <span class="code-tag">&lt;capacity&gt;</span>10485760<span
class="code-tag">&lt;/capacity&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- set
the resume capacity to 8Mb --&gt;</span></span>
            <span class="code-tag">&lt;flowResumeCapacity&gt;</span>8388608<span
class="code-tag">&lt;/flowResumeCapacity&gt;</span>
        <span class="code-tag">&lt;/producer&gt;</span>
</pre>
</div></div>

<p>The slow consumer design calls for configuration which is defined on that <a href="/confluence/display/qpid/Slow+Consumer+Disconnect"
title="Slow Consumer Disconnect">page</a> and has been included here for completeness.
</p>


<p>These 'topic' elements would of course be wrapped in a 'topics' element as is done
for 'queues'.</p>

<p>Here is a complete topics example.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeHeader panelHeader"
style="border-bottom-width: 1px;"><b>New Topic Section</b></div><div
class="codeContent panelContent">
<pre class="code-xml">
<span class="code-tag">&lt;topics&gt;</span>

    <span class="code-tag">&lt;topic&gt;</span>
        <span class="code-tag">&lt;name&gt;</span>stocks.us.*<span
class="code-tag">&lt;/name&gt;</span>
        <span class="code-tag">&lt;alerting&gt;</span>
            <span class="code-tag">&lt;depth&gt;</span>2117632<span
class="code-tag">&lt;/depth&gt;</span>
            <span class="code-tag">&lt;messageSize&gt;</span>2117632<span
class="code-tag">&lt;/messageSize&gt;</span>
            <span class="code-tag">&lt;messageAge&gt;</span>300000<span
class="code-tag">&lt;/messageAge&gt;</span>
            <span class="code-tag">&lt;messageCount&gt;</span>25<span
class="code-tag">&lt;/messageCount&gt;</span>
        <span class="code-tag">&lt;/alerting&gt;</span>

        <span class="code-tag">&lt;producer&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- set
the topic capacity to 10Mb --&gt;</span></span>
            <span class="code-tag">&lt;capacity&gt;</span>10485760<span
class="code-tag">&lt;/capacity&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- set
the resume capacity to 8Mb --&gt;</span></span>
            <span class="code-tag">&lt;flowResumeCapacity&gt;</span>8388608<span
class="code-tag">&lt;/flowResumeCapacity&gt;</span>
        <span class="code-tag">&lt;/producer&gt;</span>

        <span class="code-tag">&lt;slow-consumer-detection&gt;</span>
            <span class="code-tag"><span class="code-comment">&lt;!-- The
maximum depth before which the policy will be applied--&gt;</span></span>
            <span class="code-tag">&lt;depth&gt;</span>4235264<span
class="code-tag">&lt;/depth&gt;</span>

            <span class="code-tag"><span class="code-comment">&lt;!-- The
maximum message age before which the policy will be applied--&gt;</span></span>
            <span class="code-tag">&lt;messageAge&gt;</span>600000<span
class="code-tag">&lt;/messageAge&gt;</span>

            <span class="code-tag"><span class="code-comment">&lt;!-- The
maximum number of message before which the policy will be applied--&gt;</span></span>
            <span class="code-tag">&lt;messageCount&gt;</span>50<span
class="code-tag">&lt;/messageCount&gt;</span>

            <span class="code-tag"><span class="code-comment">&lt;!-- Policy
Selection --&gt;</span></span>
            <span class="code-tag">&lt;policy name=<span class="code-quote">"TopicDelete"</span>/&gt;</span>
        <span class="code-tag">&lt;/slow-consumer-detection&gt;</span>

    <span class="code-tag">&lt;/topic&gt;</span>

<span class="code-tag">&lt;/topics&gt;</span>
</pre>
</div></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/qpid/Topic+Configuration+Design">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=19300426&revisedVersion=7&originalVersion=6">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/qpid/Topic+Configuration+Design?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message