Higher number of active threads with elasticsearch-java dependency

Thank you for the help, we are able to figure out the issue.

we have an NetworkLoadBalancer(NLB) in front of the cluster, when we try to create a connection to the NLB, the client always connects to one IP of the NLB. That is why its not able to spin more threads(after a limit) and everything else is blocked.

Is there any way we can configure the client to pick all the IPs of the NLB.

The reason we are adding a NLB in front of our clusters is because we wanted to connect to multiple clusters at a time.