Apache camel窃听用法

时间:2015-04-02 07:58:39

标签: spring apache-camel

如果可以使用

,任何人都可以给我一个提示
.wireTap()

.bean(Test.class, "testMethod(Exchange)"); 

我正在尝试创建route,它将通过立即发送processing…消息处理请求,同时调用testMethod以处理订单

测试用例:

from("timer:test")
            //.to("log:test")
            .bean(Test.class, "testMethod2()")
            .bean(Test.class, "testMethod(Exchange)");

显示testMethod正在等待testMethod2结束。我想异步运行这两个方法

1 个答案:

答案 0 :(得分:2)

您可以在并行模式下使用多播eip

from("timer:test")
    .multicast().parallelProcessing().
            .bean(Test.class, "testMethod2()")
            .bean(Test.class, "testMethod(Exchange)")
    .end();
相关问题