Apache camel Camel:从一个路由调用另一个路由并同步返回响应

Apache camel Camel:从一个路由调用另一个路由并同步返回响应,apache-camel,spring-camel,eip,Apache Camel,Spring Camel,Eip,我有两条路线A和B,如下所示 from("some endpoint") //route A .to("direct:x") from("direct:x") //route B .doTry() .bean("somebean") //set Custom object PQR as message body .doCatch() .bean("some other bean") //log exception .end() 现在我想在路由A完成(已经完成)后调用路由

我有两条路线A和B,如下所示

from("some endpoint")  //route A
.to("direct:x")

from("direct:x")  //route B
.doTry()
   .bean("somebean")  //set Custom object PQR as message body 
.doCatch()
   .bean("some other bean")  //log exception
.end()

现在我想在路由A完成(已经完成)后调用路由B。现在,如何从路由A中的路由B获取响应PQR对象(仅当路由B成功时)?

它应该自动执行此操作。如果将路径A中的另一个
链接到
到(“direct:x”)
,它将从路径B获取响应。您可以尝试将
之后的主体记录到(“direct:x”)
,并检查结果。

它应该自动执行此操作。如果您将路径A中的另一个
链接到
到(“direct:x”)
,它将从路径B获取响应。您可以尝试将
之后的身体记录到(“direct:x”)
,并检查结果。

谢谢@Sneharghya谢谢@Sneharghya