1

I am trying to figure out how to use BulkProcessor java-rest-high-document-bulk-processor during synchronous processing (bulk method) so that I could write something like this:

    val processor = BulkProcessor.builder(
        { request, _ ->
            client.bulk(
                request,
                RequestOptions.DEFAULT
            )
        })

Unfortunately, documentation only mentions async substitutes.

I know that BulkProcessor has concurrentRequests BulkProcessor.Builder.setConcurrentRequests property which I could set to 0 but is it enough to mimic synchronous behavior?

Has anyone had a similar problem?

Thank you in advance.

avocato
  • 211
  • 3
  • 11
  • do not use `BulkProcessor` then do a `BulkRequest` and use `client.bulk(request` like explain in the linked documentation ? – ExploZe Sep 13 '21 at 13:17
  • @ExploZe I mentioned BulkProcessor because it allows me to set things like bulkActions or BackoffPolicy (hence the question). Is it possible to set mentioned properties while using sync bulk method? – avocato Sep 13 '21 at 15:27

0 Answers0