Dear,
How is it possible to wait for ASYNC REQUEST complete before call Close()?
We are using Java High Rest Client.
Our target is to create one instance of RestHighLevelClient, make many ASYNC requests (using indexAsync() method) and close the client.
Actually our issue is that we send many ASYNC request from inside a ForEach and at the end of the ForEach we call the Close() method of the client. Unfortunately it is so fast that no documents will be saved in Elastic index because we call the Close() methods before the requests has been sent to Elastic.
How we should manage this properly?