Reputation: 6206
Amazon SQS long polling is returning 0 messages when there are still messages in my queue. I've been able to reproduce this effect multiple times.
I'm aware that it's possible for SQS long polling to yield fewer messages than the max requested even if there are more messages on the queue.
I'm also aware that short polling can yield zero messages even when there are more than zero messages on the queue.
But I did not know that long polling could yield zero messages when there are more than zero messages on the queue. And from what I can tell after reading the docs, this isn't supposed to happen.
Question:
Is it possible for SQS long polling to return 0 messages even when there are messages on the queue? If so, are their specific conditions that make this likely to occur? If not, has anyone else experienced this behavior?
Upvotes: 14
Views: 5242
Reputation: 2493
Check that the group ID's are unique.
AFAIK, if one message in a group is in-flight, then the entire group is not visible.
Upvotes: 12
Reputation: 1084
As far as I know this could be related to any of these queue attributes:
Please rewiew your queue configuration. Bear in mind that it's possible to set specific visibility timeout on a message level, which could not match the value set for the queue.
Hope this may help.
Best regards,
Upvotes: 0