Good practice to create TransportClient

Hi All,
Currently, in my project, I am creating new TransportClient for each query request and have some fixed number of clients to insert records into ES. Query request can come at any time but insertion happens once in 10min(may go upto ~150000 documents ). I was wondering if I can handle all this using single singleton client. If so do I need to modify the client settings such as thread pool size? Will single client handle all this operation? How to recover singleton transport client when there is NoNodeAvailable Exception? Can some one please guide me through best practices to create transport client?

Thanks

Yes please. One single client per JVM. It's threadsafe.

1 Like

Thank you very much for your quick response.
What if this client fails because of NoNodeAvailable Exception. How to recover the client?