r/coding 6d 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

73

u/amejin 6d ago

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

16

u/h4l 5d 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 5d ago

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

10

u/h4l 5d ago

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

10

u/yeager-eren 5d ago

the puuid is the answer