Reactive Extensions for the JVM
open sourceApache-2.0self-hostablefree
RxJava is the Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs from observable sequences. It extends the observer pattern to streams of data and events, with operators that combine, transform and schedule them declaratively, so code doesn't deal with low-level threading, synchronization and thread safety itself. Its base types are Flowable (with Reactive Streams backpressure), Observable, Single, Maybe and Completable. RxJava 4, in alpha in November 2026 with a final release planned for April 2027, is a native Java 26 implementation on java.util.concurrent.Flow with virtual thread support and a new Streamable type; RxJava 3 stays supported for a year after 4.0. Apache-2.0 licensed.
Problems it solves
- compose several asynchronous calls in Java without nesting callbacks
- handle a stream of UI or network events with operators like map, filter, debounce and merge
- a producer emits data faster than my consumer can process it and I need backpressure
- run work on a background thread and deliver results on the main thread in an Android app
- retry a failing network request with a delay and a limit, declaratively
- combine the latest values from several data sources whenever any of them changes
- cancel in-flight async work cleanly when the user leaves the screen
- use Java virtual threads with a reactive streams library
Features
- Flowable (Reactive Streams with backpressure), Observable, Single, Maybe and Completable base types
- hundreds of operators to transform, combine, filter and schedule sequences
- schedulers for running work on chosen threads
- RxJava 4: native Java 26 implementation on java.util.concurrent.Flow
- RxJava 4: virtual thread support with Schedulers.virtual() and the Streamable type
- no third-party runtime dependencies; JPMS support
- tested with the Reactive Streams Test Compatibility Kit
Alternatives
The same job
These do what RxJava does.
- Kotlin Coroutines Library support for Kotlin coroutines
