Skip to content

Getting started with Mutiny#

Using Mutiny in a Java application#

Add the dependency to your project using your preferred build tool:

<dependency>
    <groupId>io.smallrye.reactive</groupId>
    <artifactId>mutiny</artifactId>
    <version>2.5.1</version>
</dependency>
implementation 'io.smallrye.reactive:mutiny:2.5.1'
implementation("io.smallrye.reactive:mutiny:2.5.1")
//DEPS io.smallrye.reactive:mutiny:2.5.1

Using Mutiny with Quarkus#

Most of the Quarkus extensions with reactive capabilities already depend on Mutiny.

You can also add the quarkus-mutiny dependency explicitly from the command-line:

mvn quarkus:add-extension -Dextensions=mutiny

or by editing the pom.xml file and adding:

<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-mutiny</artifactId>
</dependency>

Using Mutiny with Vert.x#

Most of the Eclipse Vert.x stack modules are available through the SmallRye Mutiny Vert.x Bindings project.

Bindings for Vert.x modules are named by prepending smallrye-mutiny-. As an example here’s how to add a dependency to the vertx-core Mutiny bindings:

<dependency>
    <groupId>io.smallrye.reactive</groupId>
    <artifactId>smallrye-mutiny-vertx-core</artifactId>
    <version>3.6.0</version>
</dependency>
implementation 'io.smallrye.reactive:smallrye-mutiny-vertx-core:3.6.0'
implementation("io.smallrye.reactive:smallrye-mutiny-vertx-core:3.6.0")
//DEPS io.smallrye.reactive:smallrye-mutiny-vertx-core:3.6.0