use of software.amazon.awssdk.services.sqs.model.PurgeQueueRequest in project aws-doc-sdk-examples by awsdocs.
the class SendReceiveMessages method purgeMyQueue.
public void purgeMyQueue() {
SqsClient sqsClient = getClient();
GetQueueUrlRequest getQueueRequest = GetQueueUrlRequest.builder().queueName(QUEUE_NAME).build();
PurgeQueueRequest queueRequest = PurgeQueueRequest.builder().queueUrl(sqsClient.getQueueUrl(getQueueRequest).queueUrl()).build();
sqsClient.purgeQueue(queueRequest);
}
Aggregations