弹簧-通道到多个出站通道适配器
作者:互联网
我有一个频道
<int:channel id="myChannel" />
为此,我希望将每条消息路由到多个出站通道适配器:
<int-jms:outbound-channel-adapter id="ocaOne" channel="myChannel" />
<int-jms:outbound-channel-adapter id="ocaTwo" channel="myChannel" />
我的理解是,该通道将有效地像一个队列一样工作,但是我希望每条消息都进入两个出站通道适配器.如何更改频道以充当主题?
编辑:
我相信答案是使用PublishSubscribeChannel,但我不确定(来源:http://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html)
解决方法:
考虑改用PublishSubscribeChannel(< publish-subscribe-channel>):
The PublishSubscribeChannel implementation broadcasts any Message sent to it to all of its subscribed handlers.
标签:spring,spring-integration 来源: https://codeday.me/bug/20191119/2032950.html