Skip to content

Releases: reactor/reactor-core

v3.0.5.RELEASE

10 Feb 14:11
Compare
Choose a tag to compare

This is the 5th release of Reactor 3.0, part of Aluminium-SR1 Release Train.

This is a recommended update for all Reactor 3 users, with a lot of improvements
and small bugfixes that have notably been made possible thanks to an ongoing effort
to improve the test coverage beyond 80%.

⚠️ Update considerations and deprecations

  • A number of APIs and signatures have been deprecated and are scheduled to be removed in 3.1.0.
    This should be made explicit in the associated API javadoc, but a list has been compiled in #323 too.
  • Some variants of window/buffer/windowMillis/bufferMillis were ambiguous (having close variations
    of numerical parameters, int+long or long+long). The int+long ones (max size plus a timeout) have been
    renamed with a Timeout keyword, like windowTimeoutMillis (#363) (alias and deprecate)
  • RejectedDisposable was not intended to be public and has been made package-private (#362)
  • All closed API Supplier<Queue> checks for null have been replaced with an error throw, as they are consider fatal
  • Deprecate Operators.addAndGet(AtomicLong) as not used internally, we encourage to use the other addAndGet variant or if required port this over your app/lib.
    • Exceptions.failWithCancel() is not a singleton exception anymore and Exceptions.CANCEL_STACKTRACE has been deprecated.

✨ New features and improvements

  • Tuples improvements: they are now Iterator<Object> with an unmodifiable iterator, a Tuple2 and a Tuple3
    filled with nulls won't have the same hashcode anymore (base is the size), and Tuples toString format changed
    (displays nulls, enclosed in square brackets)
  • Added decorator hook for ExecutorServices in Schedulers, allowing users to change the internal implementation
    for any core-provided Scheduler (#354)
  • Mono and ParallelFlux now have doOnEach (#344)
  • ParallelFlux now allow you to easily compose on each group's flux using composeGroup (#283)
  • Generalize fromFuture with an additonal fromCompletionStage to support more future-like use cases (#357)
  • Align delay APIs that delays elements on Mono and Flux by adding Mono.delayElement and prepare renaming
    of Flux.delay to Flux.delayElements (#263)
  • Expose groupBy with prefetch variant (#370)
  • In the same vein as for buffer, two new window operators have been introduced: windowUntil and windowWhile (#260)
  • Improvements have been made to debugging and tracing user experience (#379, #361, #417)
    • identifying the source of an error from an inner flux inside eg. a flatMap, decrease performance cost of activated assembly tracing, added Flux, Mono, ParallelFlux checkpoint(description?) operator to manually apply assembly tracing
  • Direct schedule Disposable can now be checked for isDisposed() (#410)
  • Add transform() to onAssembly scope
  • Fuseable.QueueSubscription#isEmpty() is not expected to fail anymore
  • Do not wrap rejected execution exceptions (use Exceptions.propagate() instead of Exceptions.bubble()
  • Check negative timeout for Schedulers.newElastic()
  • Check bufferSize in Flux#onBackpressureBuffer()
  • Eager cancel Flux.publish subscribers during batch of emission (#430)

🪲 Reported Bug fixes

  • Fix Mono.sequenceEquals not propagating subscribe signal + doing too much inner subscribe / too few inner cancel (#328, #329)
  • Mono.whenDelayError was wrongly only using last 2 params out of 3 (#333)
  • Fix WorkQueueProcessor potential thread leak (#335, #336)
  • Tuples and Tuple2 fixes: fixed Tuples.fromArray for size 0 and 8, (#338)
  • Due to the Tuples issue above, the zipWith was failing with less than 8 sources (#338)
  • MonoSink.success(null) now delegates to success() to ensure same semantics (#346)
  • CachedTimedScheduler.now() correctly delegates to underlying scheduler (#351)
  • Operators.addAndGet now return updated value (#372)
  • An unbounded prefetch (Integer.MAX_VALUE) on groupBy triggers unbounded request (#385)
  • Fix fusion on Flux.skipUntil, Flux.handle, fix fusion request handling for SubscribeOnValue (8f67283, f2404eb, #342)
    • Fix unbounded Flux.replay/cache fusion (#392)
  • Use unbounded queues for groupBy, window, buffer and switchMap to avoid overflow (#411)
  • Thread boundaries such as zip, flatMap or publishOn now correctly request fusion with the thread barrier flag. This means that thread expectation for upstream operators such as doOnNext or map will defeat tentative to fuse to enforce thread expectations.
  • Fix Flux & ParallelFlux reduce/collect generic issue
  • Fix linked queue minimum (was always minimum instead of the default size QueueSupplier.SMALL_BUFFER_SIZE or specified by user via QueueSupplier.unbounded(linkSize) !)
  • Fix bi-insert logic used by switchMap/join

📖 Documentation, Tests and Build

  • Various typos and wording improvements to javadocs
  • First draft of a Reference Guide (#404, with a target at spring-level quality and completion for 3.1.0)
  • Global effort on tests: increase overall coverage, better separate long-running tests that make less sense in CI,
    first shot at a TCK-like framework to ease coverage of new operators...
  • Exclude snapshot and mavenLocal from release builds (#291)

Various changes and fixes

  • Use computeIfAbsent instead of verbose null check in collectMultimap (#396)
  • OSGi bundle: don't import com.google twice (#386)
  • Introduce progressive upgrade to unbounded request FlatMap in preparation of #371
  • Fix ParallelFlux#getPrefetch accuracy of the returned value
  • Fix Mono.or optimization, add assembly on Mono.first
  • Fix Mono.when array type issue
  • Hooks (de)activation are now logged as DEBUG instead of INFO
  • Improve common operator defensive patterns regarding fusion and RS rules
  • Fuseable.SynchronousSubscription does now expect a sync request mode and will return Fuseable.NONE if requested NONE.
  • Internal renaming, in particular ParallelUnordered to Parallel
  • Remove instance cost where possible for ArrayDeque operators
  • unbounded prefetch should now correctly return Integer.MAX_VALUE not Long.MAX_VALUE on Flux#getPrefetch(), monitor #397 for the complete migration in 3.1

👍 Thanks to the following contributors that also participated to this release

@kamilszymanski, @magnet, @mrorii, @sinwe, @dfeist and all folks who came discussing in our Gitter room, Spring team for continuous extensive collaboration and @akarnokd for his usual wisdom.

v3.0.4.RELEASE

04 Jan 10:55
Compare
Choose a tag to compare

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

  • Cancellation is being deprecated and will be removed in 3.1.0. The new Disposable replaces it (#322)
    • Scheduler now implements Disposable. We advise that if you have an implementation of Scheduler, you explicitly implement both shutdown() and dispose(), 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 BaseSubscriber has 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: bufferUntil and bufferWhile (#227)
  • The new doFinally operator 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 underlying Executor is made in order to prevent you from subscribing
    too much (#199)
  • Added a doOnEach variant to Flux that takes a Consumer<Signal> (#264, #289)
  • Added a onBackpressureBuffer variant that takes a BufferOverflowStrategy,
    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.and based on a Function<T, Mono<V>> now allows to easily
    combine a value and the result of applying an asynchronous processing on it
    into a Tuple2 (#300)
  • Worker now has a isShutdown() method (#313)
  • A Disposable interface has been introduced, preparing to replace Cancellation. For now it extends Cancellation (#322)

🪲 Bug fixes

  • FluxHandle sink always use onOperatorError (#282)
  • Rework handling of RejectedExecutionException in 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 Subscription as a Collection in log() (instead using
    a dedicated format), which would cause a NotImplementedException with some
    loggers applying custom logic to Collections (#262)
  • Fix flatMapSequential dropping some elements when there are more than
    prefetch source 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

v3.0.3.RELEASE

28 Oct 11:11
Compare
Choose a tag to compare

This is the third release of Reactor 3.0. This is a recommended update for all Reactor 3 users.

Update considerations and deprecations

  • the RxJava2 adapters have been moved to external project reactor-addons/reactor-adapter
  • RxJava1Adapter support has been dropped in favor of the official rxjava-reactive-stream. Since RxJava1Adapter was broken by latest rxjava1 maintenance releases, this might not be considered a hard breaking change.
  • if you used the test class TestSubscriber from the sources, it has been removed from the public API (renamed AssertSubscriber and placed in test scope until it is removed definitely). Please use the StepVerifier class in the external project reactor-addons/reactor-tests 3.0.3.RELEASE instead.
  • the protected field subscriber in Operators.MonoSubscriber has been renamed actual to be consistent with the other reactor-core operators. It should only be impacting for users that have implemented their own Mono operators.
  • Flux#then(Publisher<Void>) has been deprecated, use the new name thenEmpty (will be removed in 3.1, see #238)
  • Flux#subscribe overrides with a prefetch parameter have been deprecated in favor of chaining the new limitRate to other variants (#225)

🐞 Known bugs

  • #230 is not entirely fixed: callbacks for onNext and onComplete can still be called in wrong order, which impacts the doOnSuccess operator.
    • see discussion in PR #243. workaround: use doOnNext rather than doOnSuccess

New features and improvements

  • new mergeSequential and flatMapSequential operators (#178)
    • these allow to eagerly subscribe to the merged publishers, but to keep items emitted by them in order
  • new limitRate operator (#180)
    • allows to control the backpressure signal sent to the upstream instead of relying on downstream backpressure signals that may be too high, effectively rate limiting the upstream
  • cached schedulers are reset and shutdown upon setFactory, and are now a Supplier<Scheduler> (#218)
  • added subscribe variants with a Consumer<Subscription> callback (#196)
  • macro and micro optimizations in Flux (fromStream, thenMany, zip) and Mono (when, and, or and thenMany) (#240, #237)

Bug fixes

  • don't share doOnSuccess state (#232)
  • fix MonoSubscriber fusion logic (#230)
  • fix PeekFuseableSubscriber#poll not using Operators.onOperatorError (#205)
  • cancel Subscription on consumer error (#212)
  • self Suppression IllegalArgumentException when 'onErrorResume' propagates existing exception (#204)
  • make Scheduler shutdown consistent handling with future.cancel(true/false)
  • do not override subscription with a cancelled one (#202)
  • various fixes synchronized from reactive-streams-commons (#215)
  • improves error handling for flow with doOnError and subscribe (#190)

Various changes

  • various code cleanups and javadoc improvements
  • increased test coverage
  • a first step in the direction of harmonizing Flux and Mono thenXXX APIs (#238, #198)
  • exported IntelliJ inspection profile, renamed code style configuration in /codequality/idea
  • ring buffer code missing attribution to https://lmax-exchange.github.io/disruptor/ (#229)
  • reduce logging level used in Hooks.onXX (#213)
  • use j.u.Objects in Signal equals and toString

Thanks to the following contributors that also participated to this release 👍 : @dfeist @poutsma @snicoll @akarnokd

v3.0.2.RELEASE - Reactor 3.0 GA !

05 Sep 14:09
Compare
Choose a tag to compare

Welcome to Reactor 3.0 !

v3.0.1.RELEASE

02 Sep 02:42
Compare
Choose a tag to compare
v3.0.1.RELEASE Pre-release
Pre-release

v3.0.0.RELEASE

22 Aug 22:19
Compare
Choose a tag to compare
v3.0.0.RELEASE Pre-release
Pre-release
[artifactory-release] Release version 3.0.0.RELEASE

v3.0.0.RC2

12 Aug 21:15
Compare
Choose a tag to compare
v3.0.0.RC2 Pre-release
Pre-release

Changes from RC1:

  • name consistency fixes on Sinks : fail -> error, MonoSink#complete -> success
  • remove MonoSink interface from MonoProcessor
  • remove fromCallableOrEmpty in favor of Mono#create
  • remove RingBuffer from surface API
  • fix Mono#when and #whenDelayError vararg/iterable signatures
  • remove TestSubscriber
  • generic "handle" operator, removing immediate need for lifting and tricks for error handling
  • global error hooks
  • TupleXx fields are no longer public, use Getters only.
  • global debug mode that auto adds logging , maybe combined with an open global hook for assembly
  • Rework some operator error utils from Exceptions linked to global state into new Hooks
  • the end of ComputationScheduler since SingleScheduler is enough for the use case of non blocking task runs
  • New Flux#doOnEach and Flux/Mono#doOnLifecycle
  • more scheduler hooks
  • porting rx join/groupJoin operators

v3.0.0.RC1

07 Aug 19:55
Compare
Choose a tag to compare
v3.0.0.RC1 Pre-release
Pre-release

Breaking from v2.5.0.M4

  • Bump to 3.0.x
  • Package restructure and name consistency fixes
  • Flux & Mono operator fixes

v2.5.0.M4

10 Jun 16:08
Compare
Choose a tag to compare
v2.5.0.M4 Pre-release
Pre-release

New exciting stuff, polishing, name changes, fixes, efficiency, clarifications: that's the result of an extended feedback and an active stream of improvements from Reactive Streams Commons.
TBC:

Breaking from M3 :

  • Computations and Timer factories are now used through Schedulers
    • Computations#concurrent -> Schedulers#elastic
    • Computations#parallel -> Schedulers#parallel or Schedulers#computation if pure non blocking tasks
  • Mono.any -> first
  • Mono.get -> block
  • Mono.toCompletableFuture -> toFuture,
  • Mono.fromCompletableFuture -> fromFuture
  • Flux.amb -> firstEmitting
  • Flux.toXx -> collectXxx
  • Flux.exists -> any
  • Flux.stream() -> toStream()
  • Flux.partition -> parallel
  • Mono and Flux after -> then
  • Mono and Flux consume -> subscribe

Removed :

  • ExecutorUtils
  • UUIDUtils moved to reactor-io/reactor-ipc
  • yield

v2.5.0.M3

21 Apr 12:19
Compare
Choose a tag to compare
v2.5.0.M3 Pre-release
Pre-release
  • Introducing Scheduler/Worker contract from Reactive Streams Commons

Breaking from M2 :

  • SchedulerGroup is now Computations and io -> concurrent, async -> parallel
  • publishOn() is now subscribeOn()
  • dispatchOn() is now publishOn()
  • connect() and similar interruptible API now return Cancellation instead of Runnable
  • Timer API changes
  • startEmitter() is now connectEmitter()

Additions :

  • scheduling support for plain ExecutorService
  • Flux#concatMapIterable/flatMapIterable
  • User experience improvements on Mono
  • Mono#when now properly completes when all input are complete.
  • + Mono#fromSupplier and Mono#whenDelayError
  • + Flux#collect(java.util.stream.Collector)
  • Minor fixes
  • Performance tweaks (yes we still can !) especially for Mono !