Bird
Raised Fist0

You have this connector config JSON:

medium📝 Debug Q14 of Q15
Kafka - Connect
You have this connector config JSON:
{
  "name": "my-sink-connector",
  "connector.class": "org.apache.kafka.connect.file.FileStreamSinkConnector",
  "tasks.max": 1,
  "topics": "my-topic"
}

What is wrong with this configuration?
A"connector.class" value is incorrect for a sink connector
B"topics" key should be "topic" (singular)
CMissing "file" property to specify output file
D"tasks.max" should be a string, not a number
Step-by-Step Solution
Solution:
  1. Step 1: Check required properties for FileStreamSinkConnector

    This connector needs a "file" property to specify the output file path.
  2. Step 2: Validate other properties

    "tasks.max" can be a number or string, "topics" is valid plural, and "connector.class" is correct.
  3. Final Answer:

    Missing "file" property to specify output file -> Option C
  4. Quick Check:

    FileStreamSinkConnector requires "file" property [OK]
Quick Trick: FileStreamSinkConnector needs "file" path set [OK]
Common Mistakes:
MISTAKES
  • Assuming "tasks.max" must be string
  • Confusing "topic" and "topics" keys
  • Changing connector.class unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes