【发布时间】:2018-09-01 02:05:49
【问题描述】:
我想为以下流程创建一个 IntegrationFlow 流程。
- 从开始到交付是同步流程。
- 如何从 Build Items 和 Validate Items 中提取/派生异步结束节点。
@Bean
public IntegrationFlow buildCart() {
return f -> f.handle(validate, "buildPreCheck")
.handle(preProcessProcessor)
.handle(getOffersProcessor)
.handle(buildItems)
**.wireTap(log())**
.handle(validateItems)
.handle(deliver);
}
编辑:
嗨,Artem,我在下面的代码中添加了 Wire Tap。仍然将 WireTap 节点作为 Sequencal 执行并等待该节点。
请帮助使其成为 Aysnc 节点。
@Bean
public IntegrationFlow log() {
return f -> f.handle(auditProcessor).channel("nullChannel");
}
@ServiceActivator
@Description("Call and get the Offers Request")
public void getDetails(Message<Context> message) throws InterruptedException {
log.info("getDetails-Sleep-Start");
Thread.sleep(3000);
log.info("getDetails-Sleep-End");
}
【问题讨论】:
-
你肯定需要在我的回答中添加评论,所以我会收到通知。否则你的编辑会被忽略。
标签: java spring-integration dsl