I'm able to successfully send messages to a queue in .NET using the AmazonSQSClient clientin the AWSSDK.SQS package.
How can I check to see whether a specific queue exists, and if it doesn't create it?
I'm able to successfully send messages to a queue in .NET using the AmazonSQSClient clientin the AWSSDK.SQS package.
How can I check to see whether a specific queue exists, and if it doesn't create it?
You'd need to run a check using the AmazonSQSClient.GetQueueUrl (string)
method, where the string is the queue name. If the queue doesn't exist, it throws QueueDoesNotExistException
. For you to do what you want, you'd need to catch the exception, and then create the queue using that name.
This is all listed in the SQS .Net Documentation here