【发布时间】:2019-11-22 15:50:33
【问题描述】:
我想实现一个骆驼 DSL 逻辑,例如,我有两个路由,其中收到的第一个路由的请求应该与来自第一个路由的响应一起传递到第二个路由。我如何做到这一点?
`.to("direct:validatePayload")
.to("bean:fundService?method=depositFund(${exchange})")
.to("bean:rparticipantService?method=notifyParticipant(${exchange})");`
在上面的代码中,在验证请求负载后,具有 Fund 主体的交易所作为请求传递给 depositFund。在此之后,我想将请求传递给 notifyParticipant,这将结合来自 depositFund 的响应以及 depositFund 收到的请求。我如何通过骆驼 DSL 代码实现这一点。
【问题讨论】:
标签: java rest spring-boot apache-camel