- Newest
- Most votes
- Most comments
There are several potential reasons why you're not receiving messages from your FIFO queue despite them being visible in the AWS console:
-
Message Group ID Behavior: In FIFO queues, if a message with a particular message group ID is in flight (being processed but not yet deleted), no more messages with the same message group ID will be returned until that message is either deleted or becomes visible again after the visibility timeout expires. This maintains the ordering guarantee within message groups.
-
Short Polling Limitations: If you're using short polling (WaitTimeSeconds set to 0), Amazon SQS only samples a subset of its servers and might not return all available messages in a single request. Subsequent requests will eventually return your messages. Consider using long polling by setting WaitTimeSeconds to a value greater than 0 (up to 20 seconds) to increase the chances of receiving messages.
-
Visibility Timeout: Messages might have been fetched but not deleted, making them temporarily invisible. Check and adjust the visibility timeout setting for your queue.
-
FIFO Throughput Limits: By default, FIFO queues support 300 transactions per second per API action. If you're exceeding this limit, you might receive throttling exceptions. Consider using batch operations or enabling high throughput for FIFO queues if needed.
To troubleshoot further:
- Implement long polling by setting WaitTimeSeconds to a value like 20 seconds
- Check the ApproximateNumberOfMessagesVisible CloudWatch metric to understand how many messages are actually available to be received
- Ensure you're properly deleting messages after processing them
- Verify that your message group ID strategy is appropriate for your use case
- Check if you're using multiple message group IDs, as this can help with parallel processing
If you're certain the message is in the queue and visible, implementing long polling should help ensure you receive the message.
Sources
Troubleshoot messages not returned for an Amazon SQS ReceiveMessage API call - Amazon Simple Queue Service
Unable to fetch data from SQS queue. | AWS re:Post
Troubleshoot FIFO throttling issues in Amazon SQS - Amazon Simple Queue Service
Amazon SQS short and long polling - Amazon Simple Queue Service
How are you verifying that the message is in the queue? If you use the Poll button in the console, it actually reads the message from the queue, making it unavailable for other consumers, i.e., your application, until the visibility timeout expires. So if you have a 30 seconds visibility timeout and you click the button, and then you try to read from the queue, you will not find any message.
Are you using short polling or long polling? Short polling may return no message when there is a small number of messages in the queue, so you should run it multiple times. It is better to use long polling. The allowed values for long polling is up to 20 seconds.
Could it be that you have another message with the same GroupID currently in flight? SQS FIFO does not allow more than a single consumer processing messages from the same group ID.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

if i use long poll time like upto 60seconds , my server will give timeout error because we kept 30sec for server time