public PurgeQueueAsync ( string queueUrl, System cancellationToken = default(CancellationToken) ) : Task |
||
queueUrl | string | The URL of the queue from which the PurgeQueue action deletes messages. Queue URLs are case-sensitive. |
cancellationToken | System | /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// |
리턴 | Task |
public Task<PurgeQueueResponse> PurgeQueueAsync(string queueUrl, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var request = new PurgeQueueRequest();
request.QueueUrl = queueUrl;
return PurgeQueueAsync(request, cancellationToken);
}
AmazonSQSClient::PurgeQueueAsync ( |
|
AmazonSQSClient::PurgeQueueAsync ( |
|
AmazonSQSClient::PurgeQueueAsync ( string queueUrl, PurgeQueueResponse>.AmazonServiceCallback |
/// <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; } }