@simonbasle simonbasle released this Apr 20, 2017 · 646 commits to master since this release

Assets 2

This is the 7th release of Reactor 3.0, part of Aluminium Release Train.

It contains backports of bug fixes and API deprecations from the 3.1.0 branch,
the later allowing to lay an easier migration path ahead of time when possible.
This is a recommended update for all Reactor 3 users.

⚠️ Update considerations and deprecations

  • Mono.flatMap becomes flatMapMany. In turn in 3.1.0 flatMap will change to the signature and behavior of current Mono.then(Function). This is semantically more correct as a flatMap traditionally returns the same type as the type it is called from (here Mono, not Flux). (#516)
    • Note that the deprecation notes refer one each other. If you want to try out the future behavior, keep using then and use flatMapMany instead of flatMap. You will have to migrate from then to flatMap in 3.1.0.
  • Prepare migration path for deep Processor rework: connect and connectSink should not be necessary anymore, Processors now have a common sink and serialize API (#525)
  • Flux/Mono error handling APIs have been realigned (#535):
    • Mono.otherwise and Flux.onErrorResumeWith aligned on onErrorResume
    • mapError aligned to onErrorMap
    • Mono.otherwiseReturn aligned to onErrorReturn
    • Mono.otherwiseIfEmpty aligned to switchIfEmpty
    • Flux.switchOnError(x) to be replaced with onErrorResume(ignore -> x)
      (notice the introduction of the lambda, but it ignores the parameter)
  • Overloads of then and its variants that take a Supplier<Mono|Publisher> are deprecated (#547)
    • Instead use the simpler overloads (Publisher/Mono based) but with a Flux.defer or Mono.defer instead of the Supplier to lazily instantiate the publisher.
  • The buffer and window variants that take both a Publisher and Function to respectively define the opening and closing boundaries for the buffer/window are deprecated in favor of a new bufferWhen / windowWhen variant (#542)

New features and improvements

  • Introduce Mono.flatMapMany and Mono.flatMap (#516)
  • Introduce Flux and Mono onErrorMap (#535)
  • Introduce Mono.onErrorReturn, Mono.switchIfEmtpy (#535)
  • Introduce Flux.bufferWhen, Flux.windowWhen (#542)

🐞 Bug fixes

  • Return new instance when chaining several Mono.untilOther (#515)
  • Fix Operators#setOnce cancelling the wrong subscription
  • Fix DeferredSubscription#isCancelled

📖 Documentation, Tests and Build

  • add missing deprecated notice to subscribe(Consumer, int)
  • Javadoc is now built with support for Java 8 apiNote tag and UTF8 charset