title: How to delete all messages from SQS Queue at once Java
body: <p>According to the Amazon documentation, the code to delete a single message from the SQS Queue is: </p>
  
  <pre><code>    // Delete a message
  System.out.println("Deleting a message.\n");
  String messageReceiptHandle = messages.get(0).getReceiptHandle();
  sqs.deleteMessage(new DeleteMessageRequest()
      .withQueueUrl(myQueueUrl)
      .withReceiptHandle(messageReceiptHandle));
  </code></pre>
  
  <p>However, say I have more than 20 or so messages, do I really have to process this for every single message? Or is there a way to do a batch delete?</p>
  
  <p>Thanks for any insights.</p>