Repository navigation
Idempotent SQS consumers: the visibility timeout is the usual culprit #4825
violetta98
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone!
I got tired of hand-rolling dedup for SQS, so I packaged it.
One thing worth knowing whether or not you use this: if your handler takes longer than the visibility timeout (30s by default), SQS makes the message visible again and hands it to a second consumer while the first is still running. Not after it fails, while it runs. That's where most "why did this run twice" reports come from.
Also worth knowing:
MessageIdonly dedupes a redelivery of the same message. If your producer sent the same event twice, you need a business key from the body instead.https://github.com/idemkit/idemkit, Apache-2.0
If it's useful, I'd appreciate a star. It's new, so visibility helps a lot right now.
All reactions