entries.add(new DeleteMessageBatchRequestEntry().withId(
Integer.toString(i)).withReceiptHandle(
requests.get(i).getReceiptHandle()));
batchRequest.setEntries(entries);
DeleteMessageBatchResult batchResult = sqsClient
.deleteMessageBatch(batchRequest);
for (DeleteMessageBatchResultEntry entry : batchResult
.getSuccessful()) {
int index = Integer.parseInt(entry.getId());
futures.get(index).setSuccess(null);
}
for (BatchResultErrorEntry errorEntry : batchResult.getFailed()) {
int index = Integer.parseInt(errorEntry.getId());
if ( errorEntry.isSenderFault() ) {
futures.get(index).setFailure( ResultConverter.convert(errorEntry));
} else {
try {