May 24th, 2012, 08:40 PM
Starting Multiple Consumers
I have been wondering about what would be the best way to go about implementing creating multiple consumers with Spring Integration Framework.
So to elaborate on the question, I am more interested in scaling the consumers that are consuming messages from a RabbitMQ broker. In the amqp example that I could run, there is a producer and a consumer. Now lets say, I am just interested in the consumer part of it. That just makes up one consumer with a context.xml file where I can define the wiring required for that consumer. What if I have the need to incrementally add more consumers as and when needed from my application.
Since I am a newbie, if I think of the layman approach, it would be having multiple context files for each consumer, but in that case I would need to know the number of consumers before hand which I do not know for my application. My application should be able to add consumers by mere clicks. Is this possible with Spring Integration? I am stuck since in the approach that I plan to take I would have to write the configuration for each consumer separately which I is not what I am looking for.
Any thoughts or suggestions ??