1
votes

Currently i have a working spring integration Project which send Message to one instance of ActiveMQ's queue. Its Uses serviceActivator as an endpoint where the handler is JMSSendingMessageHandler.java. The model is shown below:

client--->request CHannel--->Service Activator(Endpoint).

But now i want to send message to multiple instance of ActiveMQ which will be configured in the configuration file. In spring Integration , no out-of-box solution is available.
The diagram of my requirement is given below:

enter image description here

i Need to findout, how to create multiple Service Activators in runtime.

1

1 Answers

0
votes

There is out-of-the-box solution and it is called publish-subscribe-channel. And your diagram demonstrates exactly the case:

http://docs.spring.io/spring-integration/reference/html/messaging-channels-section.html#channel-implementations-publishsubscribechannel

So, you create as many service-activators as you need, for all those ActiveMQ's queue and configure their input-channel to the same publish-subscribe-channel.

Please, elaborate more about that "in runtime" requirement.