What delivery guarantees exist in Kafka?
sobes.tech AI
Answer from AI
Kafka has three main message delivery guarantees:
-
At-most-once — a message may be delivered once or not at all. This occurs if the producer does not wait for acknowledgment from the broker and does not retry sending on errors.
-
At-least-once — a message is guaranteed to be delivered, but may be delivered multiple times (duplicates). This is achieved by retrying message sending when no acknowledgment is received.
-
Exactly-once — a message is delivered exactly once without duplicates. In Kafka, this is implemented using idempotent producers and transactions, allowing atomic message writes and commits.
The choice of guarantee depends on the producer configuration, acknowledgment settings (acks), and message processing on the consumer side.