public PurgeQueueAsync ( |
||
request | Container for the necessary parameters to execute the PurgeQueue operation. | |
cancellationToken | System | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// |
return | Task |
/// <summary> /// Purges the specified queue name. /// </summary> public void Purge() { try { using (var client = new AmazonSQSClient(_credentials)) { _logger.Value.InfoFormat("SqsMessageConsumer: Purging the queue {0}", _queueUrl); client.PurgeQueueAsync(_queueUrl).Wait(); _logger.Value.InfoFormat("SqsMessageConsumer: Purged the queue {0}", _queueUrl); } } catch (Exception exception) { _logger.Value.ErrorException("SqsMessageConsumer: Error purging queue {0}", exception, _queueUrl); throw; } }