I am using the java RestHighLevelClient (6.3) for indexing. I intend to read the data from an SQS and would delete that message from SQS once successfully indexed.
I was planning to use the async BulkProcessor for this.
What I could not figure out was that though the BulkProcessor.Listener class helps provide helper methods to handle the bulk process:
- All helper methods return void.
- I cannot figure out how to get the action response back to the requestor (callee function) - so that i can delete the SQS message (or not in the case of failure).
I have a feeling that I am missing something. Maybe asynchronous processing may not be the solution. I was inclined to use the BulkProcessor as it provided a nice set of configurations - bulkSize, bulkActions, flushInterval, concurrentRequests, etc.
Would there be good examples I could refer to?
Thanks in advance.