kevin
kevin

Reputation: 570

Spring integration TCP Server with multi thread example

Spring integration has excellent example to TCP Server. But it seems to be using single thread for every socket connection.

Is there any example on how to create TCP Server which can process requests with multiple threads? Better yet, is there any example to use thread pooling in TCP Server.

I would appreciate if you can provide any links.

Thanks

Upvotes: 1

Views: 2142

Answers (1)

Gary Russell
Gary Russell

Reputation: 174759

Set using-nio="true" when processing a large number of sockets and a thread pool is shared across the connections.

For a small number of sockets it's generally faster to use a single thread per socket.

Upvotes: 1

Related Questions