Bird
Raised Fist0

What will happen if a sink connector's tasks.max is set to 3 but only one partition exists in the Kafka topic?

medium📝 Predict Output Q5 of Q15
Kafka - Connect

What will happen if a sink connector's tasks.max is set to 3 but only one partition exists in the Kafka topic?

AOnly one task will run consuming the single partition
BThree tasks will run, each consuming the same partition
CNo tasks will run due to partition mismatch
DTasks will fail with an error
Step-by-Step Solution
Solution:
  1. Step 1: Understand task to partition assignment

    Each task consumes one or more partitions; tasks cannot share partitions.
  2. Step 2: With one partition and 3 tasks max

    Only one task will be assigned the single partition; others remain idle.
  3. Final Answer:

    Only one task will run consuming the single partition -> Option A
  4. Quick Check:

    Tasks ≤ partitions; extra tasks idle [OK]
Quick Trick: Tasks cannot share partitions; extra tasks stay idle [OK]
Common Mistakes:
MISTAKES
  • Assuming all tasks run regardless of partitions
  • Thinking tasks share partitions simultaneously
  • Expecting errors due to mismatch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes