Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

When a topic reaches a set threshold for message count, size or age the attached consumer session we have three options.

  • Flow the producer.
  • Disconnect the slow consumer.

Work has already been done to flow producers on queues: Producer flow control.

...

One additional property that would be of use here would be the consumption rate. If the topic reported the consumption rate this property could be used to define a threshold that the consumer must stay above.

Code Block
xmlxml
titleConsumer Element for configuration
xml
        <consumer>
            <!-- The depth before which the policy will be applied-->
            <depth>4235264</depth>

            <!-- The message age before which the policy will be applied-->
            <messageAge>600000</messageAge>

            <!-- The number of message before which the policy will be applied-->
            <messageCount>50</messageCount>

            <!-- Policies configuration -->
            <policy name="Delete">
                <options>
                    <option name="delete-persistent" value="true"/>
                </options>
            </policy>
        </consumer>

This <consumer> element will be added to the existing queue configuration to allow specific durable subscriptions to be identified and processed. In addition a new <topic> element will be added to allow configuration for topics. The resulting section of xml would look like this:

xml
Code Block
xml
titleTopic configured for slow consumer disconnection
xml
    <topic key="stocks.us.*">
        <consumer>
            <!-- The depth before which the policy will be applied-->
            <depth>4235264</depth>

            <!-- The message age before which the policy will be applied-->
            <maessageAge>600000</messageAge>

            <!-- The number of message before which the policy will be applied-->
            <messageCount>50</messageCount>

            <!-- Policies configuration -->
            <policy name="Delete">
                <options>
                    <option name="delete-persistent" value="true"/>
                </options>
            </policy>
        </consumer>

    </topic>

...