Menu Search

14.10. Configuring of Producer Flow Control

Flow control capacity and flow resume capacity are required to set on a queue or virtual host to enable Producer flow control.

Example 14.15. Configuring a queue depth limit

                
<queue>
    <name>test</name>
    <test>
        <exchange>amq.direct</exchange>

        <!-- set the queue capacity to 10Mb -->
        <capacity>10485760</capacity>

        <!-- set the resume capacity to 8Mb -->
        <flowResumeCapacity>8388608</flowResumeCapacity>
    </test>
</queue>
                
                

The default for all queues on a virtual host can also be set

Example 14.16. Configuring of default queue depth limit on virtualhost

                
<virtualhosts>
    <virtualhost>
        <name>localhost</name>
        <localhost>

            <!-- set the queue capacity to 10Mb -->
            <capacity>10485760</capacity>

            <!-- set the resume capacity to 8Mb -->
            <flowResumeCapacity>8388608</flowResumeCapacity>
        </localhost>
    </virtualhost>
</virtualhosts>