Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon SQS long polling returning 0 messages when messages are in the Queue

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?

like image 930
Peter Berg Avatar asked Jul 28 '17 18:07

Peter Berg


1 Answers

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.

like image 59
orrymr Avatar answered Oct 18 '22 08:10

orrymr