Bird
Raised Fist0

You need a Kafka source connector setup that reads from multiple files and routes data to Kafka topics named after each file. Which strategy is most appropriate?

hard🚀 Application Q8 of Q15
Kafka - Connect
You need a Kafka source connector setup that reads from multiple files and routes data to Kafka topics named after each file. Which strategy is most appropriate?
ADeploy multiple source connectors, each configured for one file and its corresponding topic.
BConfigure one source connector to read all files and write all data to a single topic.
CUse a single source connector with a regex topic routing configuration to map files to topics.
DUse a sink connector to write data from Kafka to files named after topics.
Step-by-Step Solution
Solution:
  1. Step 1: Understand requirement

    Data from multiple files must be routed to topics named after each file.
  2. Step 2: Evaluate options

    Deploying multiple connectors is possible but inefficient; a single connector with regex routing is better.
  3. Step 3: Confirm correct approach

    Regex topic routing allows dynamic topic assignment based on file names.
  4. Final Answer:

    Use a single source connector with a regex topic routing configuration to map files to topics. -> Option C
  5. Quick Check:

    Regex routing enables dynamic topic assignment [OK]
Quick Trick: Regex topic routing maps files to topics dynamically [OK]
Common Mistakes:
MISTAKES
  • Deploying multiple connectors unnecessarily
  • Sending all data to one topic ignoring file names
  • Confusing source and sink connector roles

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes