Hi,
I am using 7.17.3 stack for elastic.
Low level Elasticsearch rest client is from 7.15.2
I see very high waiting thread count when I build the client for each request and do that in try block so it gets auto closed.
Any Idea why its not getting closed?
This caused a big blunder.
Thanks for a quick response!
I have the oauthtoken which I need to guarantee that its latest. Switching to singleton, how I can make sure my ouath token is always latest without building up client again?
I dont see option to do single put with high level client, is it same as Bulkrequest?
If I have to use auth token and use singleton rest client, How I can do that without building client again/using singleton as token will expire. any way we can provide token once we built the client?
The bearer token can be provided with every request with the RequestOptions parameter. This allows to keep one instance of the client object and modify the authentication header whenever needed.
Thanks! can you please tell me option for low level rest client? is this going to help?
request.addParameter(HttpHeaders.AUTHORIZATION, "Bearer " + getAccessToken());
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.