Hash Key Partitions
Kafka uses a hash of the message key to determine partition assignment. Understanding this mechanism is essential for ordering guarantees, avoiding hot partitions, and designing correct partition keys.
Kafka uses a hash of the message key to determine partition assignment. Understanding this mechanism is essential for ordering guarantees, avoiding hot partitions, and designing correct partition keys.
Without idempotence, the standard retry flow can produce **duplicates**:
A **producer** is a client application that publishes (writes) messages to Kafka topics. It is responsible for:
The `acks` configuration controls **how many broker acknowledgements the producer requires before considering a send successful**. It directly trades off.
Idempotence protects against duplicates within a session, but it doesn't help when: