This is the 6th release of Reactor 3.0, part of Aluminium-SR2 Release Train.
This is a recommended update for all Reactor 3 users.
⚠️ Update considerations and deprecations
- In this release, we evaluated and polished ad-hoc public api usage in preparation for the next major release
3.1.0. Specifically we:- Deprecated
FluxandMonoxxxMillis(long, ...)signatures in favor of a uniquexxx(Duration)alternative. (see #436) - Merged the now deprecated
TimedSchedulerintoSchedulerfor an easier execution contract (see #451). - Deprecated
Operators.SubscriberAdapterwhich was encouraging inefficient encapsulation. - Merged introspection interfaces
Trackable,Loopback,Producer,Receiver,MultiReceiverandMultiProducerinto a singleScannablecontract for easier serviceability extension development. (see #249) - Deprecated ambiguous
FluxSink/MonoSink.setCancellationin favor of fluent and explicitonCancelandonDispose. It's important to distinguish the various reactor shutdown states:- terminated == onError || onComplete
- cancelled == cancel
- disposed == terminated || cancelled
- Deprecated
FluxSink.serialize()since nowFlux.createdefault to serialize (see #456), use ofFlux.pushcan now be used alternatively for optimized single-producer push sources. - Aligned all error delaying aliases under combinatory conditions (merge, zip etc) to a suffixed alias standard
xxxDelayError. In 3.1 we look forward giving subscribe-time option to override this behavior if the non suffixed operator alias is used. (see #480).
- Deprecated
- Default timed operator
Scheduleris nowSchedulers.parallel, note that thread-name will now vary between the number of workers as inparallel-xinstead of a singletimed-n. (see 93a08ae)
Avoiding deprecated API now as documented in javadoc will significantly reduce the burden of updating to 3.1. We track most of the deprecated APIs marked for deletion in 3.1 in #323.
✨ New features and improvements
- Avoid unnecessary cancel events on
onNextinMonoSubscribers such as operators or terminal subscribe/block calls. (see #442) - Add
Flux/MonoDuration + Scheduler aliases (see #436) - Add
FluxSinkandMonoSinkonCancel(Disposable)andonDispose(Disposable)(see #450, #444). - Add
Scannableto query reactor component stateful graphs (see #249). - Add
Flux.pushfor single producer, push-only alternative toFlux.create(see #456). Flux.createis now "serialized by default" and allows for multi producer push (see #456).- Add
FluxSink.onRequest(LongConsumer)to notify producer of downstream requests (see #456). - Add
Mono.whenDelayError(Iterable)(see #470) - Add
Mono.untilOther(Publisher)to coordinate on anotherPublisher(see #465) - Add
Flux/MonofilterWhen(Function<T, Publisher<Boolean>>>for async filtering (see #498)
🪲 Bug fixes
- Fix
Flux.windowWhilereplenishing issue (see #477) - Fix
Flux.concatMapprefetch to unbounded when used withInteger.MAX_VALUE(see #476) - Fix
Mono.fromRunnablefusion issue that resulted in no runnable invoked (see #455) - Fix
Flux/Mono.publish(Function)ArrayOutOfBoundsException (see #438) - Fix Schedulers.fromExecutorService(mayInterruptIfNeeded) issue where interrupt option was ignored (see #443)
Throwable.addSuppressedis now protected against circle reference in error handling (see #439)- Fix
TopicProcessorsilently failing on backlog size == 1 (see #445) - Fix
Flux.flatMapIterabletermination issue (see #453) - Fix
BaseSubscriber.disposeto actually cancel upstream (see #461)
📖 Documentation, Tests and Build
- Added some advanced use documentation (see #505)
👍 Thanks to the following contributors that also participated to this release !
@lhotari @madhead @RunninglVlan @bdavisx @nebhale
A warm welcome to @rajinisivaram as our new internal contributor. You might already have noticed her name as she is also working on the awesome https://github.com/reactor/reactor-kafka.
Finally a massive thank you to our resident reactive doctor @akarnokd and his support in various design issues, lately on the new filterWhenoperator.