EDIT : I come to know that I should enable JMX in my Consumer and Producer processes and get mBean info from respective processes. How will i do this for a Java process publishing message to Kafka and other Java processes consuming messages ?
I have enabled JMX for Kafka . But still I cant see those two mBeans in jConsole.
I tried pub/sub onn Kafka broker but still no results . My steps were as follows : Added following in kafka-run-class.sh:
KAFKA_JMX_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.1.1 -Djava.net.preferIPv4Stack=true
"
Added port in export JMX_PORT=${JMX_PORT:-9999} in kafka-server-start.sh
java jar... options... app.jar
because you don't need Kafka files installed or available to run a producer or consumer application – Dichromate