Bird
Raised Fist0

How can you ensure a source connector writes data to Kafka topics with exactly-once semantics?

hard🚀 Application Q9 of Q15
Kafka - Connect
How can you ensure a source connector writes data to Kafka topics with exactly-once semantics?
ASet 'tasks.max' to 1
BEnable idempotence and transactions in Kafka producer settings
CUse a sink connector instead
DConfigure the connector to write to multiple topics
Step-by-Step Solution
Solution:
  1. Step 1: Understand exactly-once semantics in Kafka

    Exactly-once requires idempotent producers and transactional writes.
  2. Step 2: Enable idempotence and transactions in producer config

    Source connectors must configure Kafka producer with these settings.
  3. Final Answer:

    Enable idempotence and transactions in Kafka producer settings -> Option B
  4. Quick Check:

    Exactly-once = idempotence + transactions [OK]
Quick Trick: Enable idempotence and transactions for exactly-once [OK]
Common Mistakes:
MISTAKES
  • Confusing tasks.max with exactly-once
  • Thinking sink connectors affect source exactly-once
  • Assuming multiple topics guarantee exactly-once

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes