Mutiny – Intuitive Event-Driven Reactive Programming Library for Java#
Uni<String> request = makeSomeNetworkRequest(params);
request.ifNoItem().after(ofMillis(100))
.failWith(() -> new TooSlowException("💥"))
.onFailure(IOException.class).recoverWithItem(fail -> "📦")
.subscribe().with(
item -> log("👍 " + item),
err -> log(err.getMessage())
);
Event-Driven#
Mutiny places events at the core of its design.
With Mutiny, you observe events, react to them, and create elegant and readable processing pipelines.
A PhD in functional programming is not required.
Navigable#
Even with smart code completion, classes with hundreds of methods are confusing.
Mutiny provides a navigable and explicit API driving you towards the operator you need.
Non-blocking I/O#
Mutiny is the perfect companion to tame the asynchronous nature of applications with non-blocking I/O.
Compose operations in a declarative fashion, transform data, enforce progress, recover from failures and more.
Quarkus and Vert.x native#
Mutiny is integrated in Quarkus where every reactive API uses Mutiny, and Eclipse Vert.x clients are made available using Mutiny bindings.
Mutiny is however an independent library that can ultimately be used in any Java application.
Made for an asynchronous world#
Mutiny can be used in any asynchronous application such as event-driven microservices, message-based applications, network utilities, data stream processing, and of course… reactive applications!
Reactive Converters Built-In#
Mutiny is based on the Reactive Streams specification, and so it can be integrated with any other reactive programming library.
In addition, it proposes converters to interact with other popular libraries.