Removing a message from SQS after BulkProcessor completion

Hi,

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.

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.3/java-rest-high-document-bulk.html#java-rest-high-document-bulk-processor

What I could not figure out was that though the BulkProcessor.Listener class helps provide helper methods to handle the bulk process:

  1. All helper methods return void.
  2. 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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.