如何在Spring集成ServiceActivator上触发多个输出通道?

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

@Serviceactivator(inputChannel = Constants.CHANNEL_INPUT,outputChannel = Constants.CHANNEL_OUTPUT)
    public OutputDto applyValidator(Message<?> message) {
        ...
        return outputDto
        }
youcansayyes 回答:如何在Spring集成ServiceActivator上触发多个输出通道?

否;只有一个。

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

或者您可以在下游添加RecipientListRouter

本文链接:https://www.f2er.com/3144357.html

大家都在问