Trying to upgrade from 6.4.0 to 6.5.4 and noticed many deprecations. Fixed most of them except for one.
This is how the BulkProcessor was initialised in 6.4.0. indexClient is RestHighLevelClient and BulkProcessorListener implements BulkProcessor.Listener. This is all working fine.
Builder builder = BulkProcessor.builder(indexClient::bulkAsync,
new BulkProcessorListener(this.stats, errorLogWriter, appConfig.isDebug()));
builder.setConcurrentRequests(ElasticSearchConfig.concurrentRequests);
builder.setBulkActions(indexConfig.getBulkActions());
builder.setFlushInterval(TimeValue.timeValueSeconds(indexConfig.getBulkFlushInterval()));
builder.setBackoffPolicy(BackoffPolicy.exponentialBackoff(TimeValue.timeValueMillis(100), 5));
this.bulkProcessor = builder.build();
Now with 6.5.4**, indexClient::bulkAsync** has been deprecated. Also I am unable to pass RestHighLevelClient as first argument as it doesn't implement org.elasticsearch.client.Client interface. Noticed the TransportClient (which is to be deprecated) indirectly implemented Client interface but we don't use TransportClient in our codebase at all. So wondering how BulkProcessor can be initialised using RestHighLevelClient in 6.5.4.
https://www.elastic.co/guide/en/elasticsearch/client/java-api/6.5/java-docs-bulk-processor.html
Please advise as this is blocking our migration.