How Kafka keeps messages in order, and when it doesn't
Dev PatelPosted · 1 min read
Kafka guarantees order within a partition, not across a topic. Choose the partition key so that messages which must stay in order share a key.
Order can still break when a producer retries a failed batch while the next one succeeds. Enable idempotent producers, or limit in-flight requests to one, to keep order across retries.
Comments