talira

Project Reactor

Non-blocking reactive library for the JVM, with Flux and Mono, based on Reactive Streams

open sourceApache-2.0free

Project Reactor (reactor-core) is a non-blocking reactive library for the JVM, based on the Reactive Streams specification, with a Reactive Extensions-inspired API. Its two composable types are Flux (0 to N items) and Mono (0 or 1), with backpressure-aware operators and schedulers, and it interacts directly with Java's CompletableFuture, Stream and Duration. Alongside reactor-core come reactor-test and reactor-tools, a Java agent for debugging Reactor code. It requires Java 8 or later; the project is copyrighted by Broadcom.

Problems it solves

  • write non-blocking reactive code on the JVM
  • handle backpressure in a Java stream of events
  • compose async Java operations with Flux and Mono

Features

  • Flux and Mono composable reactive types with backpressure
  • Based on the Reactive Streams specification
  • Works directly with CompletableFuture, Stream and Duration
  • reactor-tools Java agent for debugging and reactor-test for testing

Limitations

  • Doesn't officially support or target Android, though it should work on Android 5.0 and later.1

Alternatives

The same job

These do what Project Reactor does.

  1. RxJava Reactive Extensions for the JVM
  2. Kotlin Coroutines Library support for Kotlin coroutines

Compare Project Reactor with the top 3