conduktor.io ↗

enable.idempotence — Kafka Producer Configuration

When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of the retried message in the stream

Description

When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of the retried message in the stream. Note that enabling idempotence requires max.in.flight.requests.per.connection to be less than or equal to 5 (with message ordering preserved for any allowable value), retries to be greater than 0, and acks must be 'all'.Idempotence is enabled by default if no conflicting configurations are set. If conflicting configurations are set and idempotence is not explicitly enabled, idempotence is disabled. If idempotence is explicitly enabled and conflicting configurations are set, a ConfigException is thrown.Type:booleanDefault:trueValid Values:Importance:low

Default Values by Kafka Version

ComponentKafka version lineDocumented default
Producer0.11.0false
Producer1.0false
Producer1.1false
Producer2.0false
Producer2.1false
Producer2.2false
Producer2.3false
Producer2.4false
Producer2.5false
Producer2.6false
Producer2.7false
Producer2.8false
Producer3.0true
Producer3.1true
Producer3.2true
Producer3.3true
Producer3.4true
Producer3.5true
Producer3.6true
Producer3.7true
Producer3.8true
Producer3.9true
Producer4.0true
Producer4.1true
Producer4.2true
Producer4.3true
Producer4.4true

Tuning Recommendation

Workload-dependent proposals, not benchmarked defaults. Review the versioned Config Advisor before applying.

ProfileProposalRationale and tradeoff
producer / throughputtrueDeduplicates retried producer batches within the producer protocol and preserves ordering with compatible settings. It is not end-to-end exactly-once processing.

Tradeoff: Requires acks=all, retries greater than zero and at most five in-flight requests in Java. Application retries across producer sessions can still duplicate business events.

Reference · 2026-10-27
producer / latencytrueDeduplicates retried producer batches within the producer protocol and preserves ordering with compatible settings. It is not end-to-end exactly-once processing.

Tradeoff: Requires acks=all, retries greater than zero and at most five in-flight requests in Java. Application retries across producer sessions can still duplicate business events.

Reference · 2026-10-27
producer / durabilitytrueDeduplicates retried producer batches within the producer protocol and preserves ordering with compatible settings. It is not end-to-end exactly-once processing.

Tradeoff: Requires acks=all, retries greater than zero and at most five in-flight requests in Java. Application retries across producer sessions can still duplicate business events.

Reference · 2026-10-27

Related Configs

acks · retries · max.in.flight.requests.per.connection · transactional.id

Manage Kafka configs across all your clusters with Conduktor Console — view, compare, and update configurations in one place.