Kafka - JMX

> Data Integration Tool (ETL/ELT) > Kafka (Event Hub)

1 - About

2 - Management

2.1 - Configuration

For example, to connect to a kafka running locally 127.0.0.1:1099

docker-compose.yml
  KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.rmi.port=1099"
  JMX_PORT: 1099

See the launch docker file

Advertising

2.2 - Query

Hown to query JMX in Kafka

timeout 1s kafka-run-class.sh kafka.tools.JmxTool --object-name 'kafka.network:type=RequestMetrics,name=RequestQueueTimeMs,request=Fetch' --jmx-url service:jmx:rmi:///jndi/rmi://127.0.0.1:3999/jmxrmi --reporting-interval 2000