我想为以下流程创建一个 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");
}
相关分类