SQS Delete Message and Change Visibility fails with ReceiptHandleInvalid Randomly #390
Unanswered
NalinKamboj
asked this question in
Help
Replies: 1 comment 1 reply
-
Not immediately sure what the issue is here but it's almost certainly something to do with timing. On my list to think about. |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Summary
My use case for SQS involves consumers taking a long time for completion, and the time range varies from 3-5 min to 15-20 min. I have set default visibility timeout to 2 minutes in AWS console, and here is my sqs-consumer config -
This works fine, but once in a while, I ran into an issue where the deleteMessage operation failed after the consumer finished. This led to the message being consumed again. This time, the changeVisibility operation failed. Surprisingly, the delete operation after consumer was done worked fine. I am not sure what's the issue here. Is my heartbeatInterval set too close to timeout?
Here are some logs for this case. You can see the error appear after cleanup function, then error handler is called with change visibility error. But after that, the cleanup function finishes and delete is successful (no error logs) -
What seems to be the issue here? Can my
heartbeatInterval
andvisibilityTimeout
values be improved?Thanks!
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions