github reactor/reactor-core v3.1.0.RC1

latest releases: v3.8.5, v3.7.18, v3.8.4...
pre-release8 years ago

This is the first RELEASE CANDIDATE of Reactor 3.0, part of upcoming Bismuth-RELEASE Release Train.

This is a recommended update for all Reactor 3 users.

⚠️ Update considerations and deprecations

  • sample will now include the last element in the source sequence if it terminates with an open sampling window (#724)
  • Scannable.getOrDefault will always use the provided default and no longer rely on the Attr global default as an intermediate fallback (#785)
  • Signal is now an interface and MutableNextSignal has been removed (#779)
  • Hooks: new hooks onEachOperator + onLastOperator, now Function<Publisher, Publisher>, new operator lift (#775) TODO expand on this
  • windowUntil/windowWhile have Flux windows instead of GroupedFlux (#759)
  • Flux.cache(Duration) now expires the termination signal as well (#750)
  • Mono#when variants are now zip. Corresponding Kotlin extensions have also been removed (zip isn't a keyword) (#789 + 52f7f04)
  • ParallelFlux#subscribe(lambdas) lambda-based variants now return a Disposable (composite of all rails subscribers, #800)
  • MonoProcessor cancel/dispose now signals CancellationException (#792)
  • Operators.onNextDropped default behaviour is to log the drop rather than throw a "fail with cancel" exception (#823)
  • DirectProcessor and UnicastProcessor now call onErrorDropped and onNextDropped if calling after terminate. Exceptions.argumentIsNullException()has been removed (most of the time replaced byObjects.requireNonNull()`). (7f6ff86)
  • Hooks in Operators (eg. onOperatorError) must now be called with the Context (#830)
  • Mono.doOnTerminate and doAfterTerminate now take a simple Runnable (aligning the API with Flux). The old doOnTerminate(BiConsumer<Throwable, T>) can be achieved with the added doOnSuccessOrError and old doAfterTerminate(BiConsumer<Throwable, T>) with doAfterSuccessOrError(BiConsumer<Throwable, T>). (#836 + 80a3210)
  • Flux.firstEmitting is now called first and Flux.firstEmittingWith is now called or, aligning APIs with those of Mono (#849)
  • static Mono.empty(Publisher<?>) has been removed, prefer using the new Mono.when(p) (2e7fdf3)
  • Context API refinement:
    • Mono#currentContext does emit empty contexts rather than terminating empty (#816)
    • contextStart renamed to subscriberContext, remove contextGet (#780)
  • Review interrupted flag on dispose (#507)
    • Removed fromExecutorService(exec, boolean) variant
    • Removed factory hook for simple ExecutorService (now all Scheduled)
  • Rename Mono.currentContext to subscriberContext() (#831)
  • Operators.onErrorDropped, onNextDropped, onOperatorError and onRejectedExecution now also take the Context as parameter (7ae167f, a9df084)
  • OpenHashSet has been removed, as it was only used for Disposables: use Disposables.composite() (40fbd60)

✨ New features and improvements

  • Upgrade to Kotlin 1.1.4-3
  • Add ability to name and tag a reactive sequence (#579)
  • Add a new Console logger, now the default fallback instead of JDK logger (#680)
  • Add utility method to check if a Throwable is composite (#770)
  • Add Swap & Composite Disposable specializations (#731, bf8d8cb)
  • onEachOperator/onLastOperator/onOperatorError hooks can be named, allowing for additive hooks AND partial hook reset (#784)
  • Offer way to do requests on original thread with subscribeOn (#777)
  • Add take(Duration) and takeUntilOther(Publisher) to Mono (#797)
  • Have ParallelFlux lambda subscribe return composite Disposable (#800)
  • Add Disposable single(), disposed() and never() factories to a Disposables utility class ( #799, #804, #812)
  • Context API refinements: factory methods and specialized implementations for 1-5 elements (#780)
  • Add Mono.cache(Duration) (#683)
  • Add "not dropped" assertions to StepVerifier assertions (96ae5ca)
  • Add Context#delete(key) (#817)
  • onErrorDropped/onNextDropped/onOperatorError/onRejectedExecution look for local hooks in the Context (b576f7f)
  • Add a PublisherProbe to easily probe for subscription in tests (#833)
  • Return original reference if unwrapped exception is null (#848)

🪲 Bug fixes

  • ParallelScheduler does not schedule task evenly between threads (#761)
  • Pass failed signal to onOperatorError in trySubscribeScalarMap (#684)
  • Remove cancel during onNext for MonoDelayElement (#749)
  • Attr.LARGE_BUFFERED defaults back to null (as in "irrelevant") (#751)
  • Revert publishOn async path detection over-optimization (#767)
  • Exceptions.addThrowable now reuse same root composite (#771)
  • Guard ExecutorScheduler against Executor's task failures (#324)
  • Catch fused flattenIterable polling failures (#841)
  • Fix windowTimeout rejection double cancel (31ef92d)
  • VirtualTimeScheduler shutdown is not correctly handled with periods (#776)
  • Protect immediate flatMap scalar emissions from out of order consuming (c7d3c12, 3abcb83, ce49077)
  • Ensure no Subscription#request throws/errors (4d61440, decfa13)
  • Avoid the shortcut of MonoProcessor.onNext(null) for onComplete (#701)

📖 Documentation, Tests and Build

  • various typos have been fixed in javadocs, README, reference guide
  • the reference guide has been reviewed and wording improved
  • Document groupBy caveats, as well as other batching methods (#726)
  • Android compatibility and best effort support is described in README statement (#796)
  • Contributing to the documentation is explained and made easier with direct edit links (#801, #808)
  • Added a clarification sink() will subscribe the emitter (2cd83c2)

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

@akarnokd, @Buzzardo, @helmbold, @lebannen, @olibye, @rajinisivaram, @sdeleuze, @violetagg, @zgagnon

Don't miss a new reactor-core release

NewReleases is sending notifications on new releases.