48,154
stars
+1
7,571
forks
2,143
watchers
4,365
prs
3,291
issues
267
releases
0
discussions
README
RxJava: Reactive Extensions for the JVM
:information_source: 4.0.0 release: 2026.11.30. Monday. Track
RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences.
It extends the observer pattern to support sequences of data/events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety and concurrent data structures.
Version 4.x (Javadoc)
- :+1: Native Java 26 implementation1.
- :+1: No 3rd party library required at runtime.
- :+1: JPMS and :question: OSGi support still intact.
- :+1: java.util.concurrent.Flow-based implementation.
- :+1: Virtual Thread support; virtualCreate(), virtualTransform(), :eye: Schedulers.virtual().
- :+1: New Streamable built around Virtual Threads & virtual blocking. Think IAsyncEnumerable for Java. :satellite: in progress.
- :+1: Using Java Cleaner API to detect resource leaks and using it for adaptive cleanups.
- :information_source: Reactive Streams Test Compatibility Kit usage; Reactive-Streams.
- :satellite: Reduce overload bloat by using record-based configurations.
- :satellite: Internal optimizations now that I have the master :key:.
- :eye: Possible usages for Scoped variables for context and per-item resource management.
- :eye: Possible inclusion of 2nd and 3rd party operators.
- :question: Android compatibility depends on your API level and what desugaring is available.
- :warning: RxJava 3.x support will be toned down in the coming months, will be offered for +1 year after 4.x official release.
1 :stop: Unfortunately Java 27 has no language or API enhancements we can use, because Structured Concurrency remained preview for one.
Getting started
Setting up the dependency
The first step is to include RxJava 4 into your project, for example, as a Gradle compile dependency:
groovy
implementation "io.reactivex.rxjava4:rxjava:4.x.y"
(Please replace x and y with the latest version numbers:
)
Hello World
The second is to write the Hello World program:
java
package rxjava.examples;
import io.reactivex.rxjava4.core.;
public class HelloWorld {
public static void main(String[] args) {
Flowable.just("Hello world").subscribe(System.out::println);
}
}
Note that RxJava 4 components now live under io.reactivex.rxjava4 and the base classes and interfaces live under io.reactivex.rxjava4.core.
Base classes
RxJava 4 features several base classes you can discover operators on:
- io.reactivex.rxjava4.core.Flowable: 0 .. N flows, supporting Reactive-Streams and backpressure,
- io.reactivex.rxjava4.core.Observable: 0 .. N flows, no backpressure,
- io.reactivex.rxjava4.core.Single: a flow of exactly 1 item or an error,
- io.reactivex.rxjava4.core.Completable: a flow without items but only a completion or error signal,
- io.reactivex.rxjava4.core.Maybe: a flow Top issues
#6132Update wiki to reflect 4.x (tracking issue)23 comments · 2018-08-03#7422Feature Request: Add unfold construct to Flowable/Observable17 comments · 2022-05-26#58134.x: Flowable missing or incorrect marbles (tracking issue)5 comments · 2018-01-17#80754.x: Separate `TestHelper.race` uses so they can run `@Isolated`4 comments · 2026-03-25#79124.x: Cache/Replay operators to be more GC friendly3 comments · 2025-10-02#7548Feature Request: Add `Observable.usingWhen()` for resources generated by a `Publisher`3 comments · 2023-03-25#69314.x: parallel performs poorly with 10+ parallelism3 comments · 2020-03-11#7956Fragile window abandonment during concatMap operations; silent data loss2 comments · 2026-01-30
Latest release
v4.0.0-alpha-21 v4.0.0-alpha-21 2026-08-05What's Changed Revise CONTRIBUTING.md for branch targeting and AI guidelines by @akarnokd in https://github.com/ReactiveX/RxJava/pull/8248 Fix FlowableCache GC issue by @DragonFSKY in https://github.com/ReactiveX/RxJava/pull/8249 Add support for JDK 28 in Gradle workflow by @akarnokd in https://github.com/ReactiveX/RxJava/pull/8251 4.x: Move TestHelper.race tests into @Isolated classes (flatMap/mergeWith batch) (8075) by @oaksprout in https://github.com/ReactiveX/RxJava/pull/8253 4.x: Streamable optimizations 2026.07.21 by @akarnokd in https://github.com/ReactiveX/RxJava/pull/8254