Skip to content

Brokers configuration

charlie edited this page Aug 11, 2014 · 6 revisions

You can configure you message broker in your camelot.xml. Specifying default values in source tag you can override it for each plugin. An example:

<?xml version="1.0" encoding="UTF-8"?>
<plugins-config xmlns="urn:config.camelot.qatools.yandex.ru">
    <source>
        <broker>
            <param name="concurrentConsumers" value="1"/>
            <param name="maxConcurrentConsumers" value="20"/>
            <param name="destination.consumer.prefetchSize" value="0"/>
            <param name="maxMessagesPerTask" value="10"/>
        </broker>
        <plugin id="sender-root-plugin">
            <aggregator>ru.yandex.qatools.camelot.sample.Sender</aggregator>
            <broker>
                <param name="maxConcurrentConsumers" value="100"/>
            </broker>
        </plugin>
    </source>
</plugins-config>

Also you can override all broker settings using brokerConfig attribute:

<plugins-config xmlns="urn:config.camelot.qatools.yandex.ru">
    <source>
        <plugin id="sender-root-plugin" brokerConfig="?maxConcurrentConsumers=2&amp;maxMessagesPerTask=3">
            <aggregator>ru.yandex.qatools.camelot.sample.Sender2</aggregator>
        </plugin>
    </source>
</plugins-config>

Clone this wiki locally