All Questions
Kafka medium

When `enable.idempotence=true` is enabled, how does a Kafka broker prevent duplicate writes when a Producer retries a failed network request?

  1. A By performing a full string comparison of the message body against the last 1MB of log data.
  2. B By checking the 'Producer ID' (PID) and a 'Sequence Number' attached to every batch. If the broker has already successfully committed that specific sequence number, it discards the retry.
  3. C By asking the ZooKeeper ensemble to verify if a similar write was attempted.
  4. D It requires the Producer to manually 'rollback' the previous failed write first.

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

Get the app

Related questions