我正在尝试做这样的事情
from("direct:start")
.to("direct:a")
// I want this route to stop here (reply with the response from "direct a"
// then starts "direct:async" in new thread because it will take time
// (more that route timeout
.to("direct:async");
答案 0 :(得分:4)
您可以使用窃听。您从 direct:start 开始路由,然后使用 wireTap 发送异步交换的副本(启动新线程),您将继续使用直接路由:一个
from("direct:start").wireTap("direct:async").to("direct:a")