Kafka does not keep your events in order. It keeps them in order in one place.
A topic is split into partitions. Ordering is guaranteed inside a partition — and nowhere else.
Which partition? hash(key) % partitions. No key, and Kafka just spreads them round-robin.
So "payment failed" can arrive before "payment started" — unless both carry the same key.
The fix is one line: key by the thing that must stay sequential. Account ID. Order ID. Not timestamp.
The catch: one key = one partition = one consumer. Order and parallelism are the same dial, pulled opposite ways.
