Bird
Raised Fist0

Identify the error in this sink connector config JSON:

medium📝 Debug Q14 of Q15
Kafka - Connect

Identify the error in this sink connector config JSON:

{
  "name": "jdbc-sink",
  "config": {
    "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
    "topic": "orders",
    "connection.url": "jdbc:postgresql://localhost:5432/shop"
  }
}
AInvalid JDBC URL format
BConnector class name is incorrect
CMissing 'topics' field; uses 'topic' instead
DMissing 'name' field
Step-by-Step Solution
Solution:
  1. Step 1: Check the topic field name

    The config uses "topic" (singular), but Kafka sink connectors require "topics" (plural).
  2. Step 2: Verify other fields

    The JDBC URL and connector class are correctly formatted, and "name" is present.
  3. Final Answer:

    Missing 'topics' field; uses 'topic' instead -> Option C
  4. Quick Check:

    Use "topics" not "topic" in sink config [OK]
Quick Trick: Use plural "topics" field in sink connector config [OK]
Common Mistakes:
MISTAKES
  • Using singular "topic" instead of "topics"
  • Assuming JDBC URL is wrong without checking
  • Thinking connector class name is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes