Search code examples
amazon-web-servicesamazon-sqsmq

Why Amazon SQS messages drop Consumer get no message


I am sending message on sqs queue and strangely message are getting dropped or deleted before consumer reads it.

I have logged activity, I can see message successfully going on queue but consumer not getting it.

What can be the reason?

This post is related , but op resolved it in private so sadly no solution


Solution

  • This does not happen. Something in your system is deleting the messages.

    It could be that you are viewing them in the console, which could trigger the Visibility Timeout. During that timeout, the messages will be invisible ("In Flight"), waiting for the requesting process to delete them once processed.

    The flow is:

    • SendMessage pushes message to the queue ("Messages Available")
    • ReceiveMessage retrieves message from the queue ("Messages In Flight")
    • Application processes message (message remains invisible)
    • If the message visibility timeout is exceeded, the message re-appears on the queue
    • DeleteMessage deletes the message from the queue