Current state: Approved
Discussion thread: here
Vote thread: here
JIRA: here
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Apache Kafka currently includes support for MX4J, a library that enables exposing JMX beans over HTTP.
This feature adds maintenance burden and potential security concerns while providing no apparent value to the Kafka community.
-Dkafka_mx4jenable=trueNowadays, the Prometheus JMX Exporter is a popular choice for Kafka monitoring, offering seamless integration with contemporary monitoring stacks such as Prometheus and Grafana.
A closer alternative to MX4j is Jolokia (RESTful JSON API) paired with Hawtio (web-based management console).
These alternatives operates through Java agents and relies solely on JMX exposure without requiring additional Kafka-specific support.
The kafka_mx4jenable system property handling logic will be first deprecated and then removed.
Add deprecation annotation and warning log to the Mx4jLoader class. The warning will be logged only when MX4j is enabled.
Phase 1 (Kafka 4.2): deprecation
Phase 2 (Kafka 5.0): removal
No test is present and none will be added for a deprecated feature.
There is no rejected alternative.