【发布时间】:2017-11-22 09:20:23
【问题描述】:
需要在 spring 集成中加入类似线程的功能。如果 3 个线程完成,则执行第 4 个线程。如图所示,3个出站网关并行运行,第4个出站只有在前3个执行后才会运行。
但是,我没有做拆分器/聚合器,所以不需要。我猜也不需要任何链式操作,因为它会按顺序执行。
<int:publish-subscribe-channel id="publishsubscribechannel"
task-executor="executor" />
<task:executor id="executor" pool-size="10" />
<int-http:inbound-channel-adapter
id="httpOrderCreateInboundAdapter"
channel="orderCreateInboundChannel" path="/input"
supported-methods="GET, POST"
</int-http:inbound-channel-adapter>
<int-http:outbound-gateway id="micros1" request-
channel="publishsubscribechannel"
reply-channel="channel1"
</int-http:outbound-gateway>
<int-http:outbound-gateway id="micros2" request-
channel="publishsubscribechannel"
reply-channel="channel2"
</int-http:outbound-gateway>
<int-http:outbound-gateway id="micros3" request-
channel="publishsubscribechannel"
</int-http:outbound-gateway>
<int-http:outbound-gateway id="micros4" request-channel="channel2"
reply-channel="channel4"
</int-http:outbound-gateway>
【问题讨论】: