Bird
Raised Fist0

Why does Kafka expose metrics via JMX instead of directly through Kafka APIs?

hard🧠 Conceptual Q10 of Q15
Kafka - Monitoring and Operations
Why does Kafka expose metrics via JMX instead of directly through Kafka APIs?
AKafka APIs do not support metrics at all
BJMX provides a standard, language-independent way to monitor JVM applications
CJMX encrypts metrics data automatically
DKafka APIs are only for message production and consumption
Step-by-Step Solution
Solution:
  1. Step 1: Understand JMX purpose

    JMX is a Java standard for monitoring and managing JVM applications.
  2. Step 2: Kafka uses JMX for language-independent monitoring

    This allows external tools to access metrics regardless of Kafka client language.
  3. Final Answer:

    JMX provides a standard, language-independent way to monitor JVM applications -> Option B
  4. Quick Check:

    JMX = standard JVM monitoring interface [OK]
Quick Trick: JMX is JVM standard for monitoring, not Kafka API limitation [OK]
Common Mistakes:
MISTAKES
  • Thinking Kafka APIs lack metrics
  • Assuming JMX encrypts data
  • Believing Kafka APIs handle monitoring

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes