Bird
Raised Fist0

Which of the following is the correct way to enable client metrics reporting in a Kafka producer configuration?

easy📝 Configuration Q12 of Q15
Kafka - with Java/Python
Which of the following is the correct way to enable client metrics reporting in a Kafka producer configuration?
A"client.metrics.enabled=yes"
B"enable.metrics=true"
C"metrics.recording.level=DEBUG"
D"metrics.sample.window.ms=30000"
Step-by-Step Solution
Solution:
  1. Step 1: Review Kafka producer metric configs

    Kafka uses properties like "metrics.sample.window.ms" to control metrics sampling intervals.
  2. Step 2: Identify valid configuration syntax

    "metrics.sample.window.ms=30000" is a valid setting to enable metrics sampling every 30 seconds.
  3. Final Answer:

    "metrics.sample.window.ms=30000" -> Option D
  4. Quick Check:

    Correct metric config syntax = "metrics.sample.window.ms=30000" [OK]
Quick Trick: Look for valid Kafka metric property names [OK]
Common Mistakes:
MISTAKES
  • Using non-existent properties like enable.metrics
  • Wrong boolean values like 'yes' instead of true/false
  • Confusing logging level with metrics config

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes