Overview
Producers write records to topics. With a key, the partition is chosen from a hash of the key; without one, the default partitioner sticks to a partition until about batch.size bytes have been produced to it, then switches. The acks setting controls durability: acks=0 means the producer does not wait for any acknowledgement, acks=1 means the leader responds after writing the record to its local log, and acks=all means the leader waits for the full set of in-sync replicas to acknowledge. Consumers track their own position, an offset, in each partition they read. Within a consumer group, each partition is consumed by exactly one consumer at any given time.
Key configuration
acks=all — the strongest guarantee, and the default
enable.idempotence=true — default; retries do not write duplicate copies
auto.offset.reset — where to start when there is no committed offset: latest (default), earliest or noneProduction tip
Check yourself
Within one consumer group, how many consumers read a given partition at the same time?
Sources
- Producer configs (4.2 documentation) (opens in a new tab)
- Consumer configs (4.2 documentation) (opens in a new tab)
- Introduction (4.2 documentation) (opens in a new tab)
- Design (4.2 documentation) (opens in a new tab)
Checked against Kafka 4.2 documentation on Oct 2026. Draft: not yet reviewed by a Kafka specialist. Releases move on, so confirm against the current documentation before you act on a number.