Spring Apache camel窃听使用

Spring Apache camel窃听使用,spring,apache-camel,Spring,Apache Camel,有人能给我一个提示吗 .wireTap() 像 我正在尝试创建路由,它将通过立即发送处理…消息来处理请求,同时调用测试方法以处理订单 测试用例: from("timer:test") //.to("log:test") .bean(Test.class, "testMethod2()") .bean(Test.class, "testMethod(Exchange)"); 显示testMethod正在等待testMeth

有人能给我一个提示吗

.wireTap()

我正在尝试创建
路由
,它将通过立即发送
处理…
消息来处理请求,同时调用
测试方法
以处理订单

测试用例:

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

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

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

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