Streaming · Flashcard

A Kafka consumer can commit its offset before or after processing a message. What does each give you?

medium Queues

Answer

Commit after processing: a crash in between reprocesses the message, so at-least-once (consumers must be idempotent). Commit before: a crash in between skips it, so at-most-once. Pick by which is worse for you: a duplicate or a lost event.

Review this in your daily deck All cards in Streaming