How to close response or connection properly of RestClient

From the document https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-low-usage-initialization.html, we know that we should use one instance of RestClient for the whold application, and close() RestClient if we shutdown application .

but i have some question about each request, do we need to close every request properly, such as call EntityUtils.consume(entity)?

and do we need to consider to put connection back to internal conntion pool (httpasynclient)and how to ?

thanks

Hi, anybody who knows this ?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.