Reputation: 8442
I'm trying to determine if it's possible to use the AmazonSQSClient to get the number of messages in an AWS FIFO queue group (messages with a specific MessageGroupId).
I have already looked at some docs: https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/SQS/TSQSClient.html
The docs hint that I might be able to do what I want with the GetQueueAttributes method... although it isn't clear. I want to do this within a Lambda function.
Is this possible?
Upvotes: 3
Views: 920
Reputation: 1512
I think the only way this would be possible would be to get the messages using ReceiveMessage
and then count the number of objects in it in code. I don't think you can "inspect" a message group as such. I believe you can only pull 10 at a time as well so there is that to consider.
GetQueueAttributes
will give you details on the queue not the messages or groups within it.
Upvotes: 6