Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus Micrometer and Reactive Messaging kafka conflict #12289

Closed
overthetop opened this issue Sep 23, 2020 · 3 comments · Fixed by #12309
Closed

Quarkus Micrometer and Reactive Messaging kafka conflict #12289

overthetop opened this issue Sep 23, 2020 · 3 comments · Fixed by #12309

Comments

@overthetop
Copy link

overthetop commented Sep 23, 2020

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] [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.RuntimeException: Could not resolve artifact org.eclipse.microprofile.metrics:microprofile-metrics-api::jar among the runtime dependencies of the application [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.

@quarkusbot
Copy link

@kenfinnigan
Copy link
Member

/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

@ebullient
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants