This is an automated email from the ASF dual-hosted git repository.

frankvicky pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new f5fcc4188f4 KAFKA-19503: Deprecate MX4j support (#20208)
f5fcc4188f4 is described below

commit f5fcc4188f44f718ac3d6a806af69495526513ca
Author: Federico Valeri <[email protected]>
AuthorDate: Tue Jul 22 14:36:24 2025 +0200

    KAFKA-19503: Deprecate MX4j support (#20208)
    
    This feature adds maintenance burden and potential security concerns
    while providing no apparent value to the Kafka community. See
    [KIP-1193](https://cwiki.apache.org/confluence/x/dAxJFg) for more
    details.
    
    Reviewers: TengYao Chi <[email protected]>, Ken Huang
     <[email protected]>
    
    ---------
    
    Signed-off-by: Federico Valeri <[email protected]>
---
 core/src/main/scala/kafka/utils/Mx4jLoader.scala | 2 ++
 docs/upgrade.html                                | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/src/main/scala/kafka/utils/Mx4jLoader.scala 
b/core/src/main/scala/kafka/utils/Mx4jLoader.scala
index 5fbbebed475..7e8b1dba53e 100644
--- a/core/src/main/scala/kafka/utils/Mx4jLoader.scala
+++ b/core/src/main/scala/kafka/utils/Mx4jLoader.scala
@@ -30,12 +30,14 @@ import javax.management.ObjectName
  *
  * This is a Scala port of org.apache.cassandra.utils.Mx4jTool written by Ran 
Tavory for CASSANDRA-1068
  * */
+@deprecated
 object Mx4jLoader extends Logging {
 
   def maybeLoad(): Boolean = {
     val props = new VerifiableProperties(System.getProperties)
     if (!props.getBoolean("kafka_mx4jenable", default = false))
       return false
+    warn("MX4j is deprecated and will be removed in Kafka 5.0")
     val address = props.getString("mx4jaddress", "0.0.0.0")
     val port = props.getInt("mx4jport", 8082)
     try {
diff --git a/docs/upgrade.html b/docs/upgrade.html
index 3beec9dcb14..c3b773a12aa 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -34,9 +34,11 @@
     <li>The <code>KafkaPrincipalBuilder</code> now extends 
<code>KafkaPrincipalSerde</code>. Force developer to implement 
<code>KafkaPrincipalSerde</code> interface for custom 
<code>KafkaPrincipalBuilder</code>.
         For further details, please refer to <a 
href="https://cwiki.apache.org/confluence/x/1gq9F";>KIP-1157</a>.
     </li>
+    <li>
+        The support for MX4J library, enabled through 
<code>kafka_mx4jenable</code> system property, was deprecated and will be 
removed in Kafka 5.0.
+    </li>
 </ul>
 
-
 <h4><a id="upgrade_4_1_0" href="#upgrade_4_1_0">Upgrading to 4.1.0</a></h4>
 
 <h5><a id="upgrade_4_1_0_from" href="#upgrade_4_1_0_from">Upgrading Servers to 
4.1.0 from any version 3.3.x through 4.0.x</a></h5>

Reply via email to