Idempotent producers prevent duplicate messages from network retries.
Problem:
Producer sends message, broker receives and writes, ack lost in network. Producer retries, broker writes duplicate.
Solution:
Enable enable.idempotence=true. Broker assigns producer ID. Each message gets sequence number. Broker rejects duplicates.
Guarantee:
Exactly-once delivery to a single partition within a producer session. Does not span multiple partitions or producer restarts without transactions.