What levels of message delivery exist in Kafka?
sobes.tech AI
Answer from AI
There are three main levels of message delivery in Apache Kafka:
-
At most once — a message may be delivered 0 or 1 times. Message loss is possible, but duplicates are excluded. This is achieved when the producer does not wait for acknowledgment from the broker.
-
At least once — a message will be delivered at least once, but duplicates are possible. The producer retries sending until it receives acknowledgment.
-
Exactly once — a message is delivered exactly once without duplicates or loss. In Kafka, this is implemented using an idempotent producer and transactions, which allow atomic message writing and offset committing.
The choice of level depends on the reliability requirements and the acceptability of duplicates in the system.