-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
False
-
At the moment, Kafka (client) automatically registers all the Kafka objects (consumer, producer, admin) into the JMX MBean platform. However, when using continuous testing, the application runs twice in the same JVM (using Classloader isolation), but it's still a single MBean platform. So, Kafka registers the objects twice with the same identifier. The second registration fails, and dump a stack trace in the console. While the application is functional, it's not pretty. At the moment, we capture the log and hide it, but the problem remains.
Also, Kafka metrics can be retrieved without using JMX, which is what we do in Quarkus. So this registration is not really useful. We actually have substitutions to remove it when compiling to native.
Upstream Jira: https://issues.apache.org/jira/browse/KAFKA-10360.