Every Kafka tutorial says the same thing: messages in a partition are ordered. Every production incident report says the same thing too, usually right before explaining how messages arrived out of order anyway. Both statements are true. The gap between them is where most teams get hurt.
Kafka's ordering guarantee is real, but it is narrow. It applies to one partition, for one producer writing in sequence, read by one consumer processing in sequence. Change any part of that sentence and the guarantee changes with it. This article walks through exactly where ordering holds, where it breaks, and how to design around both.
What Kafka actually guarantees
A Kafka topic is split into partitions. Each partition is an append-only log, and every message in it gets a monotonically increasing offset. A consumer reading one partition sees messages in offset order, always. That is the whole guarantee, and it is a strong one.
What it does not say: nothing about order across partitions.…