private static String[] attributesNames(MBeanInfo mBeanInfo) {
        return Arrays.stream(mBeanInfo.getAttributes()).map(MBeanFeatureInfo::getName).toArray(String[]::new);
    }
A program for reading JMX metrics from a given endpoint.
<p>
This tool only works reliably if the JmxServer is fully initialized prior to invoking the tool.
See KAFKA-4620 for details.
tools/src/main/java/org/apache/kafka/tools/JmxTool.java