This is the 4th release of Reactor 3.0, part of {ALUMINIUM-RELEASE} Release Train.
This is a recommended update for all Reactor 3 users.
⚠️ Update considerations and deprecations
Cancellationis being deprecated and will be removed in 3.1.0. The newDisposablereplaces it (#322)Schedulernow implementsDisposable. We advise that if you have an implementation ofScheduler, you explicitly implement bothshutdown()anddispose(), with the concrete code in dispose() and the shutdown() method calling dispose().- Same with
Scheduler.Worker
- A report has been issued in #339 and might force library developers to issue a patch release recompiled against reactor-core 3.0.4 if they wish to offer third party users option to upgrade too.
✨ New features and improvements
- A new
BaseSubscriberhas been added to allow to easily subscribe and play
with the request/cancel. It offers hooks, including a hookFinally that always
execute on sequence termination (#254, #279) - Added new buffer operators based on predicates:
bufferUntilandbufferWhile(#227) - The new
doFinallyoperator allows to perform a side effect on any type of
termination (onError, onComplete and cancel) (#251) - When using a
WorkQueueProcessor, a best effort attempt at detecting the capacity
of the underlyingExecutoris made in order to prevent you from subscribing
too much (#199) - Added a
doOnEachvariant toFluxthat takes aConsumer<Signal>(#264, #289) - Added a
onBackpressureBuffervariant that takes aBufferOverflowStrategy,
allowing to decide what to do if the bounded buffer fills up: error, drop last
element, drop oldest element in buffer... (#281) - A variant of
Mono.andbased on aFunction<T, Mono<V>>now allows to easily
combine a value and the result of applying an asynchronous processing on it
into aTuple2(#300) Workernow has aisShutdown()method (#313)- A
Disposableinterface has been introduced, preparing to replaceCancellation. For now it extends Cancellation (#322)
🪲 Bug fixes
FluxHandlesink always useonOperatorError(#282)- Rework handling of
RejectedExecutionExceptionin most processors (#275, #293, #298, #274, #299, #313, #319)- the exception is more consistently thrown by all schedulers in case its underlying executor rejects a task because the scheduler was shut down.
- Fix the onNext/onComplete callback reversal in async-fused sequences (#230)
- A Callable returning null now always trigger onError(NPE) (#261)
- Don't silence errorNotImplemented in Schedulers (#257)
- Improve doOn callback failures handling (#247)
- Prevent logging of a
Subscriptionas aCollectioninlog()(instead using
a dedicated format), which would cause aNotImplementedExceptionwith some
loggers applying custom logic to Collections (#262) - Fix
flatMapSequentialdropping some elements when there are more than
prefetchsource elements (workaround: use same number for prefetch and
maxConcurrency) (#301) - Fix the sharing of state between multiple subscribers for
Mono#doOnTerminate(#242)
Various changes
- Fix typos in javadoc of multiple files
- Update doc to 3.0.4.BUILD-SNAPSHOT
- Integrate reactor-test 3.0.4
- Build and tests improvements:
- Use compileOnly configuration and RELEASE version for JSR-166 backport dependency (#291, #292)
- Improve Travis build integration and tweak gradle tests
- Convert some long running tests to using virtual time, separate consistency
tests into their own category (not ran during PR integration), reduce iteration
count in some looping tests.
👍 Thanks to the following contributors that also participated to this release
@dfeist, @wilkinsona, @akarnokd, @not-for-me
And thanks for raising issues/feedback: @dfeist, @balamaci, @srinivasvsk, @kdvolder, @gdrouet, @artembilan, @graememoss, @jurna