Skip to main content
InterviewHubPRO
Section Overview
Q6

Question 6 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

12%
Apache Kafka Streaming (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What are the three Message Delivery Semantics?

junior LevelkafkaBasic

In Simple Words:

  1. At-Most-Once: Messages may be lost, but are never duplicated.
    • Consumer commits offset before processing message: Fetch -> Commit Offset -> Process. If the consumer crashes during processing, the message is lost forever.
  2. At-Least-Once (Default & Most Common): Messages are never lost, but may be duplicated.
    • Consumer commits offset after successfully processing message: Fetch -> Process -> Commit Offset. If the consumer crashes mid-processing, the replacement consumer re-reads the uncommitted message.
    • Requirement: Consumers must be idempotent (safe to execute multiple times).
  3. Exactly-Once Semantics (EOS): Messages are processed and committed exactly once, even during broker failures or network retries. Achieved via Kafka Transactions and idempotent producers.