All Questions
Kafka medium

A Topic has 3 partitions. A Producer sends messages A, B, and C with no specified key. The consumer receives them in the sequence A, C, B. Why is this expected behavior?

  1. A The consumer's deserializer is likely improperly shifting bits during network transit.
  2. B Total Ordering: Kafka only guarantees message order *within a single partition*. If messages are distributed across multiple partitions (e.g., via the default Sticky Partitioner), there is no cross-partition global ordering guarantee.
  3. C The Producer has `retries` enabled, and message B failed its first attempt while C succeeded.
  4. D Kafka is strictly LIFO (Last-In-First-Out) when multiple brokers are present.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions