【问题标题】:How to Trigger multiple outputchannel on Spring integration ServiceActivator?如何在 Spring 集成 ServiceActivator 上触发多个输出通道?
【发布时间】:2020-03-04 02:48:42
【问题描述】:

是否可以在我的服务激活器上触发两个输出通道?

@ServiceActivator(inputChannel = Constants.CHANNEL_INPUT,
            outputChannel = Constants.CHANNEL_OUTPUT)
    public OutputDto applyValidator(Message<?> message) {
        ...
        return outputDto
        }

【问题讨论】:

    标签: spring spring-integration integration


    【解决方案1】:

    没有;只有一个。

    如果要发送给多个消费者,可以将输出通道设为PublishSubscribeChannel,每个消费者都会收到消息。

    或者您可以在下游添加RecipientListRouter

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-21
      • 1970-01-01
      • 1970-01-01
      • 2019-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-03
      相关资源
      最近更新 更多