mercredi 5 août 2015

SQS : Getting Number of message in the SQS Queue

I am working with Amazon-SQS, I tried to retrieve approximate number of attributes from the queue but the response is null

I am using C# following is the code:

GetQueueAttributesRequest attReq = new GetQueueAttributesRequest();
attReq.QueueUrl = "Link to queue";
GetQueueAttributesResponse response = client.GetQueueAttributes(attReq);
Console.WriteLine("App. messages: "+ response.ApproximateNumberOfMessages);

I am getting null response from the request, I am sure there are messages in the queue as well.




Aucun commentaire:

Enregistrer un commentaire