Package com.amazonaws.services.sqs.model

Examples of com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry


            ResultConverter.appendUserAgent(batchRequest, AmazonSQSBufferedAsyncClient.USER_AGENT);

            List<DeleteMessageBatchRequestEntry> entries = new ArrayList<DeleteMessageBatchRequestEntry>(
                    requests.size());
            for (int i = 0, n = requests.size(); i < n; i++)
                entries.add(new DeleteMessageBatchRequestEntry().withId(
                        Integer.toString(i)).withReceiptHandle(
                        requests.get(i).getReceiptHandle()));
            batchRequest.setEntries(entries);

            DeleteMessageBatchResult batchResult = sqsClient
View Full Code Here


            ResultConverter.appendUserAgent(batchRequest, AmazonSQSBufferedAsyncClient.USER_AGENT);

            List<DeleteMessageBatchRequestEntry> entries = new ArrayList<DeleteMessageBatchRequestEntry>(
                    requests.size());
            for (int i = 0, n = requests.size(); i < n; i++)
                entries.add(new DeleteMessageBatchRequestEntry().withId(
                        Integer.toString(i)).withReceiptHandle(
                        requests.get(i).getReceiptHandle()));
            batchRequest.setEntries(entries);

            DeleteMessageBatchResult batchResult = sqsClient
View Full Code Here

   
    private void delete(String queue, List<Message> messages) {
        List<DeleteMessageBatchRequestEntry> deleteRequests = new ArrayList<DeleteMessageBatchRequestEntry>();

        for(Message m : messages) {
            deleteRequests.add(new DeleteMessageBatchRequestEntry().withId(m.getMessageId()).withReceiptHandle(m.getReceiptHandle()));
        }

        log.info(format("Deleting %s messages", deleteRequests.size()));

        DeleteMessageBatchRequest batchDelete = new DeleteMessageBatchRequest();
View Full Code Here

            ResultConverter.appendUserAgent(batchRequest, AmazonSQSBufferedAsyncClient.USER_AGENT);

            List<DeleteMessageBatchRequestEntry> entries = new ArrayList<DeleteMessageBatchRequestEntry>(
                    requests.size());
            for (int i = 0, n = requests.size(); i < n; i++)
                entries.add(new DeleteMessageBatchRequestEntry().withId(
                        Integer.toString(i)).withReceiptHandle(
                        requests.get(i).getReceiptHandle()));
            batchRequest.setEntries(entries);

            DeleteMessageBatchResult batchResult = sqsClient
View Full Code Here

            ResultConverter.appendUserAgent(batchRequest, AmazonSQSBufferedAsyncClient.USER_AGENT);

            List<DeleteMessageBatchRequestEntry> entries = new ArrayList<DeleteMessageBatchRequestEntry>(
                    requests.size());
            for (int i = 0, n = requests.size(); i < n; i++)
                entries.add(new DeleteMessageBatchRequestEntry().withId(
                        Integer.toString(i)).withReceiptHandle(
                        requests.get(i).getReceiptHandle()));
            batchRequest.setEntries(entries);

            DeleteMessageBatchResult batchResult = sqsClient
View Full Code Here

        int i = 0;
       
        for (Message message : messages) {
            logger.info("MessageId:     " + message.getMessageId());
            logger.info("ReceiptHandle: " + message.getReceiptHandle());
            deleteMsgList.add(new DeleteMessageBatchRequestEntry("msg" + i, message.getReceiptHandle()));
            i++;
        }

        try {
            DeleteMessageBatchRequest batchDeleteRequest = new DeleteMessageBatchRequest(queueUrl, deleteMsgList);
View Full Code Here

                    logger.info("    Value: " + entry.getValue());
                }
               
                i++;
               
                deleteEntryList.add(new DeleteMessageBatchRequestEntry(i + "", message.getReceiptHandle()));
            }
           
            DeleteMessageBatchRequest deleteMessageBatchRequest = new DeleteMessageBatchRequest(queueUrl);
            deleteMessageBatchRequest.setEntries(deleteEntryList);
            cqs1.deleteMessageBatch(deleteMessageBatchRequest);
View Full Code Here

                    logger.info("    Value: " + entry.getValue());
                }
               
                i++;
               
                deleteEntryList.add(new DeleteMessageBatchRequestEntry(i+"", message.getReceiptHandle()));
            }
           
            DeleteMessageBatchRequest deleteMessageBatchRequest = new DeleteMessageBatchRequest(queueUrl);
            deleteMessageBatchRequest.setEntries(deleteEntryList);
            cqs1.deleteMessageBatch(deleteMessageBatchRequest);
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.