Apache Camel 从当前路由开始新的异步路由
Apache Camel starts new asynchrounus route from current route
我正在尝试做这样的事情
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");
您可以使用窃听器。您从 direct:start 开始您的路由,然后发送一份与 wireTap 异步交换的副本(启动一个新线程),您的路由将继续 direct:a
from("direct:start").wireTap("direct:async").to("direct:a")
我正在尝试做这样的事情
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");
您可以使用窃听器。您从 direct:start 开始您的路由,然后发送一份与 wireTap 异步交换的副本(启动一个新线程),您的路由将继续 direct:a
from("direct:start").wireTap("direct:async").to("direct:a")