Migrating from RxJava 1.8 to Spring Reactor 3: First Steps

James Gan
The PayPal Technology Blog
5 min readSep 29, 2020

--

Photo by Gary Bendig on Unsplash

Introduction: RxJava, Reactor, Reasons to Migrate

RxJava and Spring Reactor are libraries that implement the Reactive Streams specification, which allows developers to create asynchronous and event-based programs through streams of data/events. The Reactive Streams specification adds methods that allow a functional style of programming on those streams, and automatically handles scalable multithreading and concurrency.

RxJava was one of the first Java implementations of a Reactive library, and one of the most adopted today. RxJava focuses on sustained support and backwards compatibility for earlier versions of Java, which allow it to be used for Android development.

Spring Reactor, on the other hand, is a newer implementation which is part of a larger framework ecosystem (Spring), and focuses on wider integrations with modern open source frameworks. One such example is the Netty framework.

Spring Reactor does not support earlier versions of Java, which make it infeasible for mobile development. However, Spring Reactor focuses on being more efficient and more modern for other types of development. As a result, even the author of a book on RxJava development has claimed that Reactor is often a better choice unless you need Android support.

--

--