How to connect quarkus Kakfa Consumer jar file with JMX Exporter properly?

437 Views Asked by At

I am trying to attach the javaagent with my jar file in which I have implemeneted a simple Kafka Consumer in Quarkus. I plan on pushing the consumer-metrics to the specifed port, with the help of the following command

java -javaagent:./jmx_prometheus_javaagent-0.16.1.jar=9080:kafkaconsumer.yml -jar ./quarkus-run.jar

I get the following error,

Error: Could not find or load main class io.quarkus.bootstrap.runner.QuarkusEntryPoint Caused by: java.lang.ClassNotFoundException: io.quarkus.bootstrap.runner.QuarkusEntryPoint

It asks for a main method but in Quarkus there is no main method. Is there a way around this?

Any help would be appreciated.

1

There are 1 best solutions below

0
On

Do you really need the JMX Exporter?

Quarkus uses Micrometer (recommended) or SmallRye Metrics to expose Prometheus data. You should wire internal JMX metrics through those endpoints instead, and Micrometer defaults to enabling JVM metrics.