Achraf Elomari
Achraf Elomari

Reputation: 335

How to Trigger multiple outputchannel on Spring integration ServiceActivator?

Is it possible to trigger two outputchannel on my Service Activator?

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

Upvotes: 0

Views: 436

Answers (1)

Gary Russell
Gary Russell

Reputation: 174759

No; only one.

If you want to send to multiple consumers, you can make the output channel a PublishSubscribeChannel and each consumer will get the message.

Or you can add a RecipientListRouter down stream.

Upvotes: 1

Related Questions