Idempotent producer or full transactions for retry-safe Kafka writes
The constraint A producer must survive client-side retries (network timeouts, broker failovers) without writing duplicate records to a single-partition-per-key workload. Kafka documents two relevant mechanisms: the idempotent producer ( enable.idempotence=true with acks=all and retries>0 ), and full transactional writes via initTransactions() / commitTran