如何设置骆驼路线的延误

时间:2016-07-04 01:50:56

标签: apache-camel jms osgi

我正在使用驼峰OSGi蓝图。我正试图在骆驼路线上设置延迟。以下是我的代码:

<camelContext id="Details"  xmlns="http://camel.apache.org/schema/blueprint">
    <threadPoolProfile id="defaultThreadPoolProfile" defaultProfile="true"
               poolSize="50" maxPoolSize="150" maxQueueSize="-1" allowCoreThreadTimeOut="false"
               rejectedPolicy="CallerRuns"/>

    <route id="Test" delayer="30000">
        <from uri="vm://testDetails?multipleConsumers=true&amp;concurrentConsumers=20" />
        <bean ref="Location" method="getDetails" />
    </route>    

    <route id="Test2">
        <from uri="vm://testDetails1?multipleConsumers=true&amp;concurrentConsumers=20" />
        <delay> 
            <constant>1000</constant>
        </delay>
        <bean ref="Location" method="getDetails" />
    </route>   

</camelContext>

以上路线无效。任何帮助将不胜感激。

0 个答案:

没有答案