是否可以在我的服务激活器上触发两个输出通道?
@Serviceactivator(inputChannel = Constants.CHANNEL_INPUT,outputChannel = Constants.CHANNEL_OUTPUT)
public OutputDto applyValidator(Message<?> message) {
...
return outputDto
}
否;只有一个。
如果要发送给多个使用者,则可以将输出通道设为PublishSubscribeChannel
,每个使用者都将收到消息。
或者您可以在下游添加RecipientListRouter
。