Choose an ordering rule
Use a source-issued sequence number when available, or a documented event time with a clear tie-breaker. Do not rely on arrival time alone unless the source guarantees ordered delivery for the exact stream and key involved.
Track the latest accepted sequence or version per entity and reject or quarantine older updates. If events represent independent facts rather than replacements, store them as separate records and derive the current view instead of discarding late arrivals.
Handle gaps and corrections
A missing sequence can indicate a delayed event or a delivery gap. Decide whether to wait briefly, request a replay from the source, or mark the entity for reconciliation; avoid silently inventing a state.
Record rejected, delayed, and replayed events with identifiers and reasons. Test permutations of the same event set so the workflow converges to the intended result regardless of delivery order.