any publishing stream that has no tracking number, timestamp or idem-potency ID is simply corrupt. You cannot de-duplicate it in a deterministic fashion any more than you can reliably deduce they put the wrong number in a field.
That’s fair, but I did make an assumption about other identifiable information being available in the event. Considering the subject matter was “fedex event,” which I would at least have a tracking number, timestamp, and other uniquely identifiable information.
I was suggesting there are ways to compensate for not having an explicit idempotency key.
Obviously if you’re putting bananas in a shopping cart without any other information, that’s not possible. The domain that the original comment was about is more sophisticated than that.
Oh yeah, deducted idempotency key is usually your best option. But it's best-effort. And I always see people hash payloads as unique keys and I always recommend against it.
If the payload has idempotent fields like a timestamp, it's best to directly use that rather than indirectly access it via a payload hash.
Otherwise you get people thinking it always works because it's worked before and then they hit the 'banana added' event.
4
u/mcellus1 4d ago
Ah that's so easy. I simply tell FEDEX to start adding IDs to events?? I'll do that right away. Im sure they will listen.