Returns whether any LrSqsMessages were deleted successfully.

public boolean hasSuccessful()

Return values

This function returns a Boolean value that represents whether any LrSqsMessage was deleted successfully using the deleteMessageBatch API.


Copy code
public int action() throws Throwable {
        LrSqsClient.initClient(region, fifoQueueUrl);
        List<LrSqsMessage> collection = LrSqsClient.receiveMessages(5, 20);
        LrSqsDeleteMessageBatchRequestStatus status = LrSqsClient.deleteMessageBatch(collection);
        if (status.hasSuccessful()) {
            Collection<LrSqsDeleteMessageBatchStatusEntry> succ_res = status.successful();
            for (LrSqsDeleteMessageBatchStatusEntry entry : succ_res){
                lr.output_message("Message id within batch: " +;
        if (status.hasFailed()){
            lr.output_message("Failed to delete: " + status.failed().size());


        return 0;