Menu Search

14.14. An example of virtual host configuration file

Example 14.18. An example of virtual host configuration file

<?xml version="1.0" encoding="ISO-8859-1"?>
<virtualhosts>
    <virtualhost>
        <name>localhost</name>
        <localhost>
            <store>
                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
                <!--<class>org.apache.qpid.server.store.derby.DerbyMessageStore</class>
                <environment-path>${QPID_WORK}/derbystore/localhost</environment-path>-->
            </store>

            <housekeeping>
                <threadCount>2</threadCount>
                <checkPeriod>20000</checkPeriod>
            </housekeeping>

            <exchanges>
                <exchange>
                    <type>direct</type>
                    <name>test.direct</name>
                    <durable>true</durable>
                </exchange>
                <exchange>
                    <type>topic</type>
                    <name>test.topic</name>
                </exchange>
            </exchanges>
            <queues>
                <exchange>amq.direct</exchange>
                <maximumQueueDepth>4235264</maximumQueueDepth>
                <!-- 4Mb -->
                <maximumMessageSize>2117632</maximumMessageSize>
                <!-- 2Mb -->
                <maximumMessageAge>600000</maximumMessageAge>
                <!-- 10 mins -->
                <maximumMessageCount>50</maximumMessageCount>
                <!-- 50 messages -->

                <queue>
                    <name>queue</name>
                </queue>
                <queue>
                    <name>ping</name>
                </queue>
                <queue>
                    <name>test-queue</name>
                    <test-queue>
                        <exchange>test.direct</exchange>
                        <durable>true</durable>
                    </test-queue>
                </queue>
                <queue>
                    <name>test-ping</name>
                    <test-ping>
                        <exchange>test.direct</exchange>
                    </test-ping>
                </queue>

            </queues>
        </localhost>
    </virtualhost>

    <virtualhost>
        <name>development</name>
        <development>
            <store>
                <class>org.apache.qpid.server.store.MemoryMessageStore</class>
                <!--<class>org.apache.qpid.server.store.derby.DerbyMessageStore</class>
                <environment-path>${QPID_WORK}/derbystore/development</environment-path>-->
            </store>

            <queues>
                <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
                <maximumMessageCount>50</maximumMessageCount>
                <queue>
                    <name>queue</name>
                    <queue>
                        <exchange>amq.direct</exchange>
                        <maximumQueueDepth>4235264</maximumQueueDepth>
                        <!-- 4Mb -->
                        <maximumMessageSize>2117632</maximumMessageSize>
                        <!-- 2Mb -->
                        <maximumMessageAge>600000</maximumMessageAge>
                        <!-- 10 mins -->
                    </queue>
                </queue>
                <queue>
                    <name>ping</name>
                    <ping>
                        <exchange>amq.direct</exchange>
                        <maximumQueueDepth>4235264</maximumQueueDepth>
                        <!-- 4Mb -->
                        <maximumMessageSize>2117632</maximumMessageSize>
                        <!-- 2Mb -->
                        <maximumMessageAge>600000</maximumMessageAge>
                        <!-- 10 mins -->
                    </ping>
                </queue>
            </queues>
        </development>
    </virtualhost>

    <virtualhost>
        <name>test</name>
        <test>
            <store>
                <!--<class>org.apache.qpid.server.store.MemoryMessageStore</class>-->
                <class>org.apache.qpid.server.store.derby.DerbyMessageStore</class>
                <environment-path>${QPID_WORK}/derbystore/test</environment-path>
            </store>

            <queues>
                <minimumAlertRepeatGap>30000</minimumAlertRepeatGap>
                <maximumMessageCount>50</maximumMessageCount>
                <queue>
                    <name>queue</name>
                    <queue>
                        <exchange>amq.direct</exchange>
                        <maximumQueueDepth>4235264</maximumQueueDepth>
                        <!-- 4Mb -->
                        <maximumMessageSize>2117632</maximumMessageSize>
                        <!-- 2Mb -->
                        <maximumMessageAge>600000</maximumMessageAge>
                        <!-- 10 mins -->
                    </queue>
                </queue>
                <queue>
                    <name>ping</name>
                    <ping>
                        <exchange>amq.direct</exchange>
                        <maximumQueueDepth>4235264</maximumQueueDepth>
                        <!-- 4Mb -->
                        <maximumMessageSize>2117632</maximumMessageSize>
                        <!-- 2Mb -->
                        <maximumMessageAge>600000</maximumMessageAge>
                        <!-- 10 mins -->
                    </ping>
                </queue>
            </queues>
        </test>
    </virtualhost>
</virtualhosts>