I have a java application(say A) which communicate with an application(say B) via TCP Socket. My java application is multithreaded, can handle up to 100 threads. To communicate between A --> B we have 10 sockets.
Challenges -
Connection Pooling - need connection pooling mechanism to handle n(say 100) number of thread(of application A), communicating to application B via x(say 10) number of TCP Socket.
Multithreading - How can two thread access same socket send the request one by one and get back the response mapped to appropriate thread.
- Multiple request - Is it possible that two thread can send the request on single socket simultaneously.
Can we over come this challenge via any framework? Is it possible? I heard that Spring Integration/ApacheCamel/Local MQ can resolve this solutions. Any examples.