Example usage for com.amazonaws.services.sqs AmazonSQS deleteMessageBatch

List of usage examples for com.amazonaws.services.sqs AmazonSQS deleteMessageBatch

Introduction

In this page you can find the example usage for com.amazonaws.services.sqs AmazonSQS deleteMessageBatch.

Prototype

DeleteMessageBatchResult deleteMessageBatch(String queueUrl,
        java.util.List<DeleteMessageBatchRequestEntry> entries);

Source Link

Document

Simplified method form for invoking the DeleteMessageBatch operation.

Usage

From source file:jp.classmethod.aws.gradle.sqs.AmazonSQSMessageConsumerTask.java

License:Apache License

private void deleteMessages(AmazonSQS sqs, String queueUrl,
        List<DeleteMessageBatchRequestEntry> messagesToDelete) {
    if (!deleteMessages || messagesToDelete.isEmpty()) {
        return;//from  ww  w  .j a  v a  2  s .  c  o  m
    }

    getLogger().lifecycle("Deleting {} messages from {}, still working...", messagesToDelete.size(), queueUrl);
    sqs.deleteMessageBatch(queueUrl, messagesToDelete);
}