Quarkus: Quarkus Micrometer and Reactive Messaging kafka conflict

Created on 23 Sep 2020  路  3Comments  路  Source: quarkusio/quarkus

Quarkus version: 1.8.1

<dependencies> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-micrometer</artifactId> </dependency> </dependencies>

when I add these two dependencies and try to build I get an error

Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.addIndexDependencyPaths(ApplicationArchiveBuildStep.java:167) [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.scanForOtherIndexes(ApplicationArchiveBuildStep.java:133) [ERROR] at io.quarkus.deployment.index.ApplicationArchiveBuildStep.build(ApplicationArchiveBuildStep.java:107) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936) [ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277) [ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) [ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) [ERROR] at java.base/java.lang.Thread.run(Thread.java:834) [ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)

Everything works fine when I remove the reactive messaging kafka dependency.

aremetrics arereactive-messaging aresmallrye kinbug

All 3 comments

/cc @cescoffier, @kenfinnigan, @phillip-kruger

/cc @ebullient

Right now Reactive Messaging has a hard dependency on MP Metrics API, which means it won't work without it.

Can you try setting quarkus.micrometer.binder.mp-metrics.enabled to true in application.properties and adding microprofile-metrics-api artifact as a dependency to your project? It's not a long term solution, but I think it should get you working

The above isn't a ginormous change, but resolves the issue (which was the direct import of a class that referenced MP Metrics classes in the deployment module).

I was able to reproduce in the micrometer-jmx test by adding the dependency.

Was this page helpful?
0 / 5 - 0 ratings