SQS weird behaviour with inflight messages #1687
Unanswered
asger-noer
asked this question in
Q&A
Replies: 1 comment
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue
I experience a problem on the queue that the code below is consuming. I have a producer that creates 8 notifications on SNS with the queue as a destination (AWS console reports the 8 messages publish). Out of the 8 messages I receive 6 (logged right after receiving function). The AWS console reports 2 messages in flight after the other messages have been processed. They never return to the queue, even after the visibility timeout. They are not moved to the DLQ either.
Janky solution
I've experienced that the addition of a sleep of 50ms after deletion resulted in the code working as expected.
Queue
As per the dashboard below, you can see the publishing of 8 messages, but only deletion of 6.
Stats from the dashboard
Code
Beta Was this translation helpful? Give feedback.
All reactions