Apache Qpid : Topic Configuration Design
This page last changed on Apr 23, 2010 by ritchiem.
Topic Configuration DesignCurrently 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. The first important section is the topic definition. Rather than using dynamically named elements that we cannot validate we use a property to name the topic.
<topic key="stocks.us.*">
This approach allows us to simply use the dotted notation as well as enabling us to validate the xml. Currently alerting is picked up from the global 'queues' configuration section. Now that we have a 'topic' section we can 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. <alerting> <depth>2117632</depth> <messageSize>2117632</messageSize> <messageAge>300000</messageAge> <messageCount>25</messageCount> </alerting> 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 Producer flow control 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. <producer> <!-- set the topic capacity to 10Mb --> <capacity>10485760</capacity> <!-- set the resume capacity to 8Mb --> <flowResumeCapacity>8388608</flowResumeCapacity> </producer> The slow consumer design calls for configuration which is defined on that page and has been included here for completeness. These 'topic' elements would of course be wrapped in a 'topics' element as is done for 'queues'. Here is a complete topics example. New Topic Section <topics> <topic key="stocks.us.*"> <alerting> <depth>2117632</depth> <messageSize>2117632</messageSize> <messageAge>300000</messageAge> <messageCount>25</messageCount> </alerting> <producer> <!-- set the topic capacity to 10Mb --> <capacity>10485760</capacity> <!-- set the resume capacity to 8Mb --> <flowResumeCapacity>8388608</flowResumeCapacity> </producer> <consumer> <!-- The maximum depth before which the policy will be applied--> <maximumDepth>4235264</maximumDepth> <!-- The maximum message age before which the policy will be applied--> <maximumMessageAge>600000</maximumMessageAge> <!-- The maximum number of message before which the policy will be applied--> <maximumMessageCount>50</maximumMessageCount> <!-- Available Policies : Delete | Cycle --> <policy name="Delete"> <options> <option name="include-persistent" value="true"/> </options> </policy> </consumer> </topic> </topics> |
![]() |
Document generated by Confluence on May 26, 2010 10:32 |