Reputation: 1
I am using spring integration to fetch records through tcp. There is a collection of client ids, getting split into individual client id messages to fetch respective records. This works fine as of now. Now, to improve the performance, I need to break the collection into sub collections and use client ids from sub collection to fetch records. I've implemented splitter to break the collection, but its working for only one thread. program ends after servicing first request only i.e. first collection of clients.
How can i implement the scenario using multithreading ?
Upvotes: 0
Views: 2890
Reputation: 121262
Just make an output channel of your splitter as an Executor one:
<int:channel id="executorChannel">
<int:dispatcher task-executor="someExecutor"/>
</int:channel>
Upvotes: 2