Senior
What delivery strategy is implemented in Kafka by default?
sobes.tech AI
Answer from AI
By default, Kafka implements an "at least once" delivery strategy. This means that each message will be delivered to the consumer at least once, but in some cases, it may be delivered multiple times (duplicates).
The reason is that the producer receives an acknowledgment of the message being written to the log, and the consumer manages the offset independently. If the consumer has not committed the offset after processing the message, it may receive the same message again upon restart.
To ensure "exactly once" delivery, additional logic is required, such as idempotent producers and transactions, which are not included in the default configuration.