Bird
0
0

You want MirrorMaker 2 to replicate only topics starting with "logs-" from source to target cluster. Which config setting achieves this?

hard📝 Application Q15 of 15
Kafka - Multi-Datacenter and Replication
You want MirrorMaker 2 to replicate only topics starting with "logs-" from source to target cluster. Which config setting achieves this?
A"topics": "logs-*"
B"topics": "logs-"
C"topics.regex": "logs-.*"
D"topics.regex": "^logs$"
Step-by-Step Solution
Solution:
  1. Step 1: Understand topic filtering in MirrorMaker 2

    MirrorMaker 2 supports filtering topics by regex using the "topics.regex" config.
  2. Step 2: Match regex to desired pattern

    To match all topics starting with "logs-", the regex "logs-.*" correctly matches any topic beginning with "logs-".
  3. Step 3: Compare options

    "topics": "logs-*" uses "topics" with wildcard which is not supported; "topics": "logs-" matches exact topic name; "topics.regex": "^logs$" matches only "logs" exactly.
  4. Final Answer:

    "topics.regex": "logs-.*" -> Option C
  5. Quick Check:

    Use topics.regex with proper regex for filtering [OK]
Quick Trick: Use topics.regex with regex pattern to filter topics [OK]
Common Mistakes:
MISTAKES
  • Using wildcard * in topics instead of regex
  • Confusing exact match with regex match
  • Using incorrect regex that matches wrong topics

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes