4

I tried to test the reactive web client provided by vertx munity web client.

I followed the official guide Quarkus - Getting Started with Reactive.

And added the following in dependencies.

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-resteasy-jsonb</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>smallrye-mutiny-vertx-web-client</artifactId>
        </dependency>

But when I injected Vertx as mentioned in the article, and got the CDI unsatisfied dependency exception. Vertx is not available.

Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type io.vertx.mutiny.core.Vertx and qualifiers [@Default]
        - java member: com.example.PostResourceClient#vertx

The complete codes are here.

Hantsy
  • 8,006
  • 7
  • 64
  • 109

1 Answers1

7

You need to add the io.quarkus:quarkus-vertx dependency to your POM to activate the Vertx extension. io.smallrye.reactive:smallrye-mutiny-vertx-web-client is an external dependency that does not activate any extension.

Martin Kouba
  • 1,121
  • 5
  • 8