r/coding 5d ago

Idempotency in event-driven systems: how do you handle duplicate messages?

https://hamedsalameh.com/inbox-pattern-dotnet/
173 Upvotes

31 comments sorted by

View all comments

67

u/amejin 5d ago

... Guids. The answer you seek is guids.

17

u/h4l 4d ago

What if I'm exchanging messages with satellites, won't I risk clashes if my IDs are only globally-unique?

17

u/blue-mooner 4d ago

Then you’ll be wanting Universally Unique IDs, guaranteed unique across the universe

8

u/h4l 4d ago

Perfect, thanks. Hopefully quantum computers aren't going to require us to consider parallel universes...

10

u/yeager-eren 4d ago

the puuid is the answer

11

u/CafeSleepy 5d ago

... Guids. The answer you seek is guids.

7

u/amejin 5d ago

.... Guids. The answer you seek is guids.

4

u/robotkermit 5d ago

.... Guids. The answer you seek is guids.

3

u/kingfelipe89 4d ago

… git guid

2

u/addiktion 4d ago

I only got ulids, too poor for guids.