I want to configure a spring integration application so that if I put a number of tasks, each represented by one message, on a channel then one of a group of endpoints will pick the next task and process it. This would entail some thread pool executor service I guess.
Share
Yes, use a dispatcher + task executor with the channel (aka ExecutorChannel). That way any endpoint (e.g.
service-activator) consuming from the channel will be invoked asynchronously using dispatcher’s thread pool.In the following example, any messages landing on channel
channel01will be consumed by thejobLauncherservice within one of thetaskExecutorthreads.