Reactor Core

Non-Blocking Reactive Foundation for the JVM
Alternatives To Reactor Core
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Bacon.js6,4438,6962683 months ago222November 03, 202090mitTypeScript
Functional reactive programming library for TypeScript and JavaScript
Reactive6,1671,3581,6902 days ago37June 14, 2023136mitC#
The Reactive Extensions for .NET
Reactive Streams Jvm4,68036176722 days ago22May 22, 202226mit-0Java
Reactive Streams Specification for the JVM
Reactor Core4,6671,00560712 hours ago130July 11, 2023130apache-2.0Java
Non-Blocking Reactive Foundation for the JVM
Rxpy4,5282722 days ago15July 16, 202238mitPython
ReactiveX for Python
Reactor3,545581668 days ago118July 11, 202310apache-2.0
Reactor Bill Of Materials (tracking reactor-core, reactor-netty and more)
Most3,4531,070306a year ago79October 08, 202048mitJavaScript
Ultra-high performance reactive programming
Rsocket Java2,26943914 months ago46June 06, 202337apache-2.0Java
Java implementation of RSocket
Marble2,0819217 months ago159March 06, 20235mitTypeScript
Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.
Kefir1,8289,2102626 months ago86November 28, 202038mitJavaScript
A Reactive Programming library for JavaScript
Alternatives To Reactor Core
Select To Compare

Alternative Project Comparisons

Reactor Core

Join the chat at Reactor Core Latest

CI on GHA Codecov Code Quality: Java Total Alerts

Non-Blocking Reactive Streams Foundation for the JVM both implementing a Reactive Extensions inspired API and efficient event streaming support.

Since 3.3.x, this repository also contains reactor-tools, a java agent aimed at helping with debugging of Reactor code.

Getting it

Reactor 3 requires Java 8 or + to run.

With Gradle from or Maven Central repositories (stable releases only):

repositories {

    // Uncomment to get access to Milestones
    // maven { url "" }

    // Uncomment to get access to Snapshots
    // maven { url "" }

dependencies {
    compile "io.projectreactor:reactor-core:3.6.0-M3"
    testCompile "io.projectreactor:reactor-test:3.6.0-M3"

    // Alternatively, use the following for latest snapshot artifacts in this line
    // compile "io.projectreactor:reactor-core:3.6.0-SNAPSHOT"
    // testCompile "io.projectreactor:reactor-test:3.6.0-SNAPSHOT"

    // Optionally, use `reactor-tools` to help debugging reactor code
    // implementation "io.projectreactor:reactor-tools:3.6.0-M3"

See the reference documentation for more information on getting it (eg. using Maven, or on how to get milestones and snapshots).

Note about Android support: Reactor 3 doesn't officially support nor target Android. However it should work fine with Android SDK 21 (Android 5.0) and above. See the complete note in the reference guide.

Trouble building the project?

Since the introduction of Java Multi-Release JAR File support one needs to have JDK 8, 9, and 21 available on the classpath. All the JDKs should be automatically detected or provisioned by Gradle Toolchain.

However, if you see error message such as No matching toolchains found for requested specification: {languageVersion=X, vendor=any, implementation=vendor-specific} (where X can be 8, 9 or 21), it means that you need to install the missing JDK:

Installing JDKs with SDKMAN!

In the project root folder run SDKMAN env initialization:

sdk env install

then (if needed) install JDK 9:

sdk install java $(sdk list java | grep -Eo -m1 '9\b\.[ea|0-9]{1,2}\.[0-9]{1,2}-open')

then (if needed) install JDK 21:

sdk install java $(sdk list java | grep -Eo -m1 '21\b\.[ea|0-9]{1,2}\.[0-9]{1,2}-open')

When the installations succeed, try to refresh the project and see that it builds.

Installing JDKs manually

The manual Operation-system specific JDK installation is well explained in the official docs

Getting Started

New to Reactive Programming or bored of reading already ? Try the Introduction to Reactor Core hands-on !

If you are familiar with RxJava or if you want to check more detailed introduction, be sure to check !


A Reactive Streams Publisher with basic flow operators.

  • Static factories on Flux allow for source generation from arbitrary callbacks types.
  • Instance methods allows operational building, materialized on each subscription (Flux#subscribe(), ...) or multicasting operations (such as Flux#publish and Flux#publishNext).

Flux in action :

    .map(d -> d * 2)


A Reactive Streams Publisher constrained to ZERO or ONE element with appropriate operators.

  • Static factories on Mono allow for deterministic zero or one sequence generation from arbitrary callbacks types.
  • Instance methods allows operational building, materialized on each Mono#subscribe() or Mono#get() eventually called.

Mono in action :

    .flatMap(time -> Mono.first(serviceA.findRecent(time), serviceB.findRecent(time)))
    .timeout(Duration.ofSeconds(3), errorHandler::fallback)
    .doOnSuccess(r -> serviceM.incrementSuccess())

Blocking Mono result :

Tuple2<Long, Long> nowAndLater =
                Flux.just(1).delay(1).map(i -> System.currentTimeMillis()))


Reactor uses a Scheduler as a contract for arbitrary task execution. It provides some guarantees required by Reactive Streams flows like FIFO execution.

You can use or create efficient schedulers to jump thread on the producing flows (subscribeOn) or receiving flows (publishOn):

Mono.fromCallable( () -> System.currentTimeMillis() )
    .flatMap(time ->
        Mono.fromCallable(() -> { Thread.sleep(1000); return time; })
    , 8) //maxConcurrency 8


ParallelFlux can starve your CPU's from any sequence whose work can be subdivided in concurrent tasks. Turn back into a Flux with ParallelFlux#sequential(), an unordered join or use arbitrary merge strategies via 'groups()'.

Mono.fromCallable( () -> System.currentTimeMillis() )
    .parallel(8) //parallelism
    .doOnNext( d -> System.out.println("I'm on thread "+Thread.currentThread()) )

Custom sources : Flux.create and FluxSink, Mono.create and MonoSink

To bridge a Subscriber or Processor into an outside context that is taking care of producing non concurrently, use Flux#create, Mono#create.

Flux.create(sink -> {
         ActionListener al = e -> {

         // without cancellation support:

         // with cancellation support:
         sink.onCancel(() -> {
    // Overflow (backpressure) handling, default is BUFFER
    .doOnComplete(() -> System.out.println("completed!"))

The Backpressure Thing

Most of this cool stuff uses bounded ring buffer implementation under the hood to mitigate signal processing difference between producers and consumers. Now, the operators and processors or any standard reactive stream component working on the sequence will be instructed to flow in when these buffers have free room AND only then. This means that we make sure we both have a deterministic capacity model (bounded buffer) and we never block (request more data on write capacity). Yup, it's not rocket science after all, the boring part is already being worked by us in collaboration with Reactive Streams Commons on going research effort.

What's more in it ?

"Operator Fusion" (flow optimizers), health state observers, helpers to build custom reactive components, bounded queue generator, converters from/to Java 9 Flow, Publisher and Java 8 CompletableFuture. The repository contains a reactor-test project with test features like the StepVerifier.

Reference Guide


Getting started with Flux and Mono


Reactor By Example

Head-First Spring & Reactor

Beyond Reactor Core

  • Everything to jump outside the JVM with the non-blocking drivers from Reactor Netty.
  • Reactor Addons provide for adapters and extra operators for Reactor 3.

Powered by Reactive Streams Commons

Licensed under Apache Software License 2.0

Sponsored by VMware

Popular Reactive Projects
Popular Stream Projects
Popular Control Flow Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Reactive Streams
Reactive Extensions