3 ms·
> What you need is for all sent messages to have unique IDs that will never repeat, and then log those. That's known as an idempotency token. So your problem i
by lisper 2y ago
> What you need is for all sent messages to have unique IDs that will never repeat, and then log those. That's known as an idempotency token.
So your problem is not really a problem because you yourself present the solution. The real problem is:
> But even then, logging all those UUIDs forever
But you don't need to log them all forever. Just make the UUIDs sequential, and all you need then is to keep track of the smallest id that has not yet been received. (You can be more efficient by storing more state, but it's not necessary. Remember, we're assuming at-least-once deliver here, so you can always force retransmission by not acknowledging receipt.)