Spring 集成 - DSL - 拆分或分叉

我想为以下流程创建一个 IntegrationFlow 流程。

http://img2.mukewang.com/6125ae990001541413640330.jpg

从开始到交付是同步流程。

如何从 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");

}


MMMHUHU
浏览 156回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java