Kafka hard
When `enable.idempotence=true` is NOT set, what is the risk of having `max.in.flight.requests.per.connection > 1` on a high-velocity Topic?
- A The Producer will experience a 'BufferUnderflow' exception.
- B Message Re-ordering: If Batch 1 fails but Batch 2 (sent immediately after) succeeds, the Producer will retry Batch 1. Batch 1 will now be written to the log *after* Batch 2, violating the timeline.
- C The broker will automatically double the replication factor to handle the pressure.
- D It forces all consumers into a 'read_uncommitted' isolation level.
Answer: B. Message Re-ordering: If Batch 1 fails but Batch 2 (sent immediately after) succeeds, the Producer will retry Batch 1. Batch 1 will now be written to the log *after* Batch 2, violating the timeline.
Pipelining multiple requests is great for speed, but 'Order' depends on every request succeeding in sequence. Idempotent producers solve this by including sequence numbers, allowing the Broker to re-order the batches correctly even if they arrive/retry out of sequence.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When implementing 'Exactly-Once Semantics' (EOS) in a Kafka stream, what is the role of the `isolation.level=read_committed` setting on the Consumer?
- Historically, which external service was required by Kafka to manage cluster hierarchy, metadata, and leader election status?
- Once a message is successfully appended to a Kafka partition log, what is its mutability status?
- In a Kafka cluster, what is the role of a 'Broker'?
- What is the primary indicator of a bottleneck in a Kafka consumer's processing logic?
- What is the primary architectural role of Apache Kafka in a distributed system?