Bird
0
0

You want to ensure that only topics starting with 'sales_' are replicated between clusters using MirrorMaker 2. Which configuration snippet achieves this?

hard📝 Application Q8 of 15
Kafka - Multi-Datacenter and Replication
You want to ensure that only topics starting with 'sales_' are replicated between clusters using MirrorMaker 2. Which configuration snippet achieves this?
A"topics": "sales"
B"topics": "^.*sales_"
C"topics": "*sales_*"
D"topics": "sales_.*"
Step-by-Step Solution
Solution:
  1. Step 1: Understand regex for topic filtering

    To match topics starting with 'sales_', regex should be 'sales_.*'.
  2. Step 2: Evaluate options

    "topics": "sales_.*" correctly uses regex to match any topic beginning with 'sales_'. Others do not match this pattern properly.
  3. Final Answer:

    "topics": "sales_.*" -> Option D
  4. Quick Check:

    Regex for prefix match = sales_.* [OK]
Quick Trick: Use regex sales_.* to match topics starting with sales_ [OK]
Common Mistakes:
  • Using incorrect regex anchors
  • Using wildcard * incorrectly
  • Not using regex at all

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes