Bird
Raised Fist0

You wrote this sink connector config:

medium📝 Debug Q14 of Q15
Kafka - Connect
You wrote this sink connector config:
{
  "name": "my-sink-connector",
  "config": {
    "connector.class": "FileStreamSink",
    "tasks.max": "1",
    "file": "/tmp/output.txt",
    "topic": "input-topic"
  }
}

But no data appears in /tmp/output.txt after running. What is the likely problem?
AThe connector class name is incorrect; it should be FileStreamSource
BThe file path /tmp/output.txt is not writable by the connector
CThe topic name 'input-topic' does not exist or has no data
DThe tasks.max value must be greater than 1
Step-by-Step Solution
Solution:
  1. Step 1: Check connector class correctness

    The class FileStreamSink is correct for writing Kafka data to a file.
  2. Step 2: Verify topic existence and data flow

    If the topic input-topic does not exist or has no data, no output will be written.
  3. Final Answer:

    The topic name 'input-topic' does not exist or has no data -> Option C
  4. Quick Check:

    Sink needs data in topic to write = B [OK]
Quick Trick: Check topic exists and has data for sink connectors [OK]
Common Mistakes:
MISTAKES
  • Assuming connector class is wrong when it is correct
  • Ignoring topic data availability
  • Thinking tasks.max affects data flow directly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes