News for hackers. Stuff that matters.
Re:Show HN: An SQS Alternative on Postgres by samtheprogram on Thursday May 09, 2024 @12:26PM (#40309863)
You don’t achieve exactly once at the protocol/queue level, but at the service/consumer level. This is why SQS guarantees at-least-once.

It’s generally what you described, but the term I’ve seen is “nonce” which is essentially an ID on the message that’s unique, and you can check against an in-memory data store or similar to see if you’ve already processed the message, and simply return / stop processing the message/job if so.

Re:Show HN: An SQS Alternative on Postgres by mcqueenjordan on Thursday May 09, 2024 @12:38PM (#40310008)
And just to add a small clarification since I had to double take: this isn't exactly-once delivery (which isn't possible), this is exactly-once processing. But even exactly-once processing generally has issues, so it's better to assume at least once processing as the thing to design for and try to make everything within your processing ~idempotent.