Releases: reactor/reactor-core
v3.3.14.RELEASE
Reactor-Core 3.3.14.RELEASE
is part of Dysprosium-SR17
release train.
This is a maintenance release.
β¨ New features and improvements
πͺ² Bug fixes
- Metrics should prioritize closest tag in case of duplicates (#2560)
- Rework how stepName() is computed (backport #2551 in 3.3.14.RELEASE)
skipUntil
conditional subscriber logic inconsistent (#2578)- Fix OverflowException in MultiSubscriptionSubscriber, notably affecting
concatMap
(#2576)
π Documentation, Tests and Build
- Fix some metrics tests to avoid implicit use of globalRegistry (#2575)
- [build] Enforce NoHTTP with plugin and relevant exclusions (#2574)
- [build] Document the Java 8/9 stubs in Core's build file (#2573)
- Fix a few return types in Mono javadocs (#2581)
- Amend SerializedSubscriberTest to accept rare double discard (#2592)
- Improve explanations in Retry javadoc (#2609)
π Thanks to the following contributors that also participated to this release
v3.4.2
Reactor-Core 3.4.2
is part of 2020.0.3
Release Train (Europium
SR3).
This service release contains a couple bugfixes inherited from 3.3.13.RELEASE
as well as additional documentation polishing.
This note focuses on changes specific to this version, see also from 3.3.13.RELEASE
release notes
π Documentation, Tests and Build
π Thanks to the following contributors that also participated to this release
v3.3.13.RELEASE
Reactor-Core 3.3.13.RELEASE
is part of Dysprosium-SR16
Release Train.
This service release contains a couple bugfixes and documentation polishing.
πͺ² Bug fixes
- Fix groupBy initial request off by one (#2450)
- fix #2534 Fix leak in MonoSingle and improve MonoSubscriber setValue
π Documentation, Tests and Build
- Mirror the SUPPORT health file in reference guide (#2552)
π Thanks to the following contributors that also participated to this release
v3.4.1
Reactor-Core 3.4.1
is part of 2020.0.2
Release Train (Europium SR2).
This service release contains bugfixes and new features.
This note focuses on changes specific to this version, but all changes from 3.2.22.RELEASE
and 3.3.12.RELEASE
are also included.
β οΈ Update considerations and deprecations
- fix #2459 Add a composite of all source as cause to firstWithValue error
- this was overlooked when merging the new operator in 3.4.0, so we decided it was fresh enough that the slight behavior change would be acceptable
β¨ New features and improvements
- fix #2195 Add timed() operator
- this new operator exposes various timing information on a
Timed
wrapper object, allowing richer output ofDuration
compared toelapsed()
andtimestamp()
(which useTuple2
andLong
)
- this new operator exposes various timing information on a
- [reactor-test] fix #2269 Add test util to capture logs in early-established loggers (see also #2512)
LoggerUtils
allows the early installation of aLogger
factory that will forward to a classic factory AND let the user activate a logging indirection later on during tests- this allows a
TestLogger
to capture internal logs from operators that were classloaded earlier than the unit test
- [reactor-test] fix #1518 Add cold variants of
TestPublisher
- cold variants better behave wrt backpressure and can replay to multiple subscribers at various stages
- the old behavior (of ignoring requested amount) is still available through a
createColdNonCompliant
variant
- [reactor-test] When asserting
Context
inStepVerifier
, say from which operator the asserted Context was taken (#2518)
πͺ² Bug fixes
- Make
RetryWhenMainSubscriber#onError
's calls serial (#2499, Fixes #2488) - fix #2513 ReplayProcessor now correctly pass nanos to buffer, not ms
- from 3.3.12.RELEASE:
- fix #2519 Cancel propagation on empty collectXxx
- from 3.2..22.RELEASE:
- fix #2498 Exception thrown in Flux.handle causes hanging in fused case
π Documentation, Tests and Build
- Various documentation improvements (#2463, #2457, #2469)
- fix #2468 Review and polish deprecation suppressions
- fix #2502 Generate OSGI Bundle-Version from Europium+ scheme
π Thanks to the following contributors that also participated to this release
v3.3.12.RELEASE
Reactor-Core 3.3.12.RELEASE
is part of Dysprosium-SR15
Release Train.
This service release contains a couple bugfixes and documentation polishing.
This note focuses on changes specific to this version, but all changes from 3.2.22.RELEASE
are also included.
πͺ² Bug fixes
- fix #2519 Cancel propagation on empty collectXxx
- from 3.2.22.RELEASE:
- fix #2498 Exception thrown in Flux.handle causes hanging in fused case
π Documentation, Tests and Build
- The
Mono
contract was not sufficiently and explicitly stated in the docs, this has been fixed (#2481) - Effort around test tooling: switch to JUnit5, remove JUnit4, switch to AssertJ (#2442, #2465, #2467, #2491)
- Improvements to the javadoc/marble diagrams (#2413, #2289, #2200, #2483, #2509, #2504
- Improvements to the reference guide:
- Bump to latest generation of plugins for asciidoctor (#2510) + allow forcing rendering of pdf reference guide (97f4e4e)
π Thanks to the following contributors that also participated to this release
v3.2.22.RELEASE
Reactor-Core 3.2.22.RELEASE
is part of Californium-SR23
Release Train.
This is the last release of Californium
π
This service release contains a bug fix, as well as some polishing changes.
πͺ² Bug fixes
- fix #2498 Exception thrown in Flux.handle causes hanging in fused case
π Documentation, Tests and Build
- fix #2482 Fix alignment of 1st onNext in flatMapSequential diagrams
- fix #2506/#2527 Switch to GitHub Actions for CI
- Polish to the build wrt repositories order
π Thanks to the following contributors that also participated to this release
v3.4.0
Reactor-Core 3.4.0
is part of 2020.0.0
Release Train (codename Europium
).
This is the first GA release of Europium π
This note focuses on 3.4.0
proper, curating changes from across all milestones.
Note that the 3.4.0 effort was started right after 3.3.5.RELEASE
, so this version also contains changes from 3.3.6 to 3.3.11 (see the end of the notes for links).
β οΈ Known Issues
- the
firstWithValue
new operator has an undocumented way of checking the cause of failure for individual sources, but it uses a suppressed exception rather than a cause. Please refrain from using that, as we'll switch toinitCause
in3.4.1
(and properly document the behavior, setting it in stone) => #2459
β οΈ Update considerations
β οΈ ποΈ Removals
- Schedulers deprecated back in 3.3 have been removed (
WorkQueueProcessor
andTopicProcessor
, #2208) - Previously deprecated methods and types have been removed (see #2277)
β οΈ β Deprecations
Schedulers.elastic()
and variants are deprecated, to be removed in 3.5 (#1893)FluxProcessor
(as well as all concrete implementations of it) are now deprecated and will be removed in 3.5 (#2188, #2431)- see the main focus section below for more details
- [api-change]
MonoProcessor
is made abstract and deprecated, to be removed in 3.5 (#2188, #1053 / f04bede, #2431)- see the main focus section below for more details
Flux.subscribe(Consumer<Subscription>)
variant is deprecated, to be removed in 3.5 (#1825)first
is deprecated to be renamed tofirstWithSignal
(seefirstWithValue
in the new features below). The old deprecated method will be removed in 3.5 (#2173)Context
changes (#2282):- Operators exposing the
Context
at points where there is no use attempting to use write methods are deprecated and will be removed in 3.5 (#2293, 7d6c862)- these all receive a
ContextView
-based variant (see new features below) deferWithContext
=>deferContextual
with aContextView
Signal.getContext()
=>Signal.getContextView()
- these all receive a
- Operators modifying the
Context
are renamed to be clearer. Old names are deprecated and will be removed in 3.5 (see new feature below, #2148, eed93d6)
- Operators exposing the
β οΈ β»οΈ Behavior Changes
- Most operators that take a
Duration
and convert it to milliseconds now use nanosecond precision (#1734) Operators.onErrorDropped
no longer throws, but only logs the dropped exception (#1431)- When an
onError
signal reaches the last (lambda based) subscriber in a chain which doesn't have an error handler, the exception is no longer thrown but only logged (#2176) - Vanilla implementations of
Scheduler
now initiate their backing infrastructure and applySchedulers
decorator instart()
rather than the constructor (#1778)start()
is also now implicitly called when instantiating aScheduler
via theSchedulers.Factory
- Allows to avoid
this
leaking from constructor β οΈ Custom implementations should similarly initialized and optionally decorate instart()
EmitterProcessor
with a full backpressure queue no longer blocks until data is requested, but fails fast (#2049)- Metrics changes
- Change in how metric meters/tags are named in accordance with the
name
operator (#1928, #2302)flow
tag has been removed entirely- using the
name({String})
operator will replacereactor.
prefix in meter names with the user-provided{String}.
β οΈ using custom tags via thetags(String...)
operator, but notname(String)
still creates a sparse set of tags in the application which could be rejected by some metrics backend
- Change name of some meters that used to include (redundant) unit names (#1807)
reactor_requested_requested_amount
=>{name}_requested
reactor_subscribed_subscribers
=>{name}_subscribed
- notice these meters also take the user-provided
{name}
into account from the above change
- Differentiate empty vs valued sequences in metrics via the
status
tag, introducingcompletedEmpty
value (#1803)
- Change in how metric meters/tags are named in accordance with the
β οΈ β¨ Main focus: Sinks
Sinks
are a new API constructed to replace the FluxProcessor
and MonoProcessor
APIs, which have been deprecated (#2431, #1053).
We distinguish Sinks.Many<T>
(a Flux
-like sink), Sinks.One<T>
(a Mono
-like sink) and Sinks.Empty
(a Mono<Void>
-like sink).
These sinks are constructed through specs under the Sinks
class. They expose a two-faced API:
- methods starting with
tryEmit
are atomic, never throw (#2319, #2329, #2336, #2426) and immediately return anEmitResult
enum (originally named Emission) indicating various variations of success or error (#2319, #2338) - methods starting with
emit
attempt to provide an easier facade over the above, take anEmitFailureHandler
allowing to fine tune some aspects of the default behavior (#2377)
By default, the instances are "serialized", detecting parallel usage and failing fast in tryEmit
(#2342, #2410, #2365, 19fc1ba, #2412).
The vanilla reactor sink implementations of emit
API terminate with the equivalent of an emitError
when parallel usage is detected (#2365) but by using the EmitFailureHandler
to drive the sink to retry, possibly with a small amount of sleeping, it should be possible to optimistically get rid of the contention.
It is also possible to get a low-overhead, low-protection instance of vanilla sinks by using the Sinks.unsafe()
spec (#2418).
This doesn't detect parallel usage, so it must be used in a responsible way (in a context where the Reactive Streams contract is already externally enforced).
Sinks also expose a asFlux()
view (or asMono()
, as relevant) for them to be passed to downstream and subscribed, and also expose a bit of state through currentSubscriberCount()
getter (#2372) and by being Scannable
(at a minimum for TERMINATED
and CANCELLED
attributes, #2394).
Compared to existing processors, most flavors have a sink equivalent except DirectProcessor
, with two close cousins under Sinks.many().multicast()
(#2392, #2451):
directAllOrNothing
will ignoretryEmitNext
attempts when at least one subscriber doesn't have enough demand,directBestEffort
will instead push to the subset of subscribers with demand and drop from the perspective of slow subscribers.
This differs from DirectProcessor
in the sense that both these sinks are kept open in such a situation, so slow subscribers that increase their request will start seeing values pushed after that (instead of being immediately terminated in DirectProcessor).
There is also a new flavor: an onBackpressureError()
variant of the unicast Sink (#2347)
π Bugfixes
See links to Dysprosium releases (3.3.6 to 3.3.11) at the end.
β¨ New features
concatMap
now has a variant with 0 prefetch (#2202)- All
Scannable
operators answer the newAttr.RUN_STYLE
attribute with aRunStyle
enum (#2058, #2123)- the enum allows to identify operators that run synchronously. Attribute is accessible both at
Publisher
andSubscriber
level RunStyle.SYNC
guarantees the operator doesn't change threadsRunStyle.ASYNC
indicates the operator MAY change threadsRunStyle.UNKNOWN
(the default) indicates there's no available information (eg. due to the operator wrapping an arbitraryPublisher
)
- the enum allows to identify operators that run synchronously. Attribute is accessible both at
- A Reactor-wide Micrometer
MetricsRegistry
other than the global one can now be configured (#2253, 64fd556)- Use
Metrics.MicrometerConfiguration#useRegistry
for that purpose - The above will attempt to load Micrometer classes, so Micrometer MUST be on the classpath
- Use
- New reactive context features (#2282):
Context
now extends a simplifiedContextView
API which only expose the read methods (#2279, #2293)- the goal is to avoid exposing a seemingly writable (copy-on-write)
Context
when the only meaningful operations are read operations - exposed in
Signal#getContextView()
,deferContextual
operator (variant to deferWithContext) and newtransformDeferredContextual
operator
- the goal is to avoid exposing a seemingly writable (copy-on-write)
- Added
transformDeferredContextual
operator that takes aBiFunction
, allowing to access theContextView
in the transformation (#2280 then renamed in #2293)Mono.subscribe(valueConsumer, errorConsumer, ...)
errorConsumer
now gets notified of exceptions thrown by the valueConsumer
(#1995)
- Renamed
Context
operators with clearer names (#2148, eed93d6)Mono.subscriberContext()
is not aliased, we now advise to useMono.deferContextual(Mono::just)
to get the exact same behaviorsubscriberContext(Context)
is replaced bycontextWrite(ContextView)
(notice the use ofContextView
)- subscriberContext(Function) is replaced by
contextWrite(Function)
- Added method to snapshot factory+global schedulers (#2325, #2326, f9c7993)
- use
Schedulers.setFactoryWithSnapshot(Factory)
to get aSnapshot
object while replacing theFactory
- reset the old factory by using
resetFrom(Snapshot)
- this is used by the reactor-test
VirtualTimeScheduler
to reset previously customized factories
- use
- The
ParallelFlux.subscribe(array)
method is now public to allow delegation in wrappers (#2328) - The
Retry
object driving#retryWhen
operator can now store user-provided state in the form of aContextView
, which is exposed throughRetrySignal
(#2312, bd8db8a) - The
GroupedFlux#key()
method is now marked as@NonNull
(#2397) - Added
firstWithValue
factory operator (#2173, 41c937f)- like
first
, it let multiple sources compete - except it prioritizes valued sources: empty sources are considered irrelevant
- if no...
- like
v3.3.11.RELEASE
Reactor-Core 3.3.11.RELEASE
is part of Dysprosium-SR13
Release Train.
This is a recommended update for all Reactor 3 users.
This release also contains all changes available in 3.2.21.RELEASE
πͺ² Bug fixes
- fix #2389 Potential integer overflow on BoundedElasticScheduler constructor
π Documentation, Tests and Build
- fix #2416 Don't blanket hide deprecated members in javadoc
- fix #2358 correct marbles for transformDeferred
- [test] Fix flakky boundedElasticScheduler test (#2425)
- [test] #2437 migrate tests to junit5
π Thanks to the following contributors that also participated to this release
v3.2.21.RELEASE
Reactor-Core 3.2.21.RELEASE
is part of Californium-SR22
Release Train.
This is a minor maintenance release polishing the build and documentation.
π Documentation, Tests and Build
- fix #2346 fix windowWithBoundary marble diagram
- fix #2344, #2436 migrate tests to junit 5
- fix #2439 correctly use testNG platform for testNG task
- [doc] Fix List ref name in hybrid push/pull code
π Thanks to the following contributors that also participated to this release
v3.4.0-RC2
Reactor-Core 3.4.0-RC2
is part of 2020.0.0-RC2
Release Train (codename Europium
).
This second Release Candidate brings further changes to the Sinks
API introduced in M2 and polished in RC1.
This release note contains all the changes specific to RC2, as well as some forwarded changes that will be released in 3.3.11.RELEASE.
β οΈ Update considerations and deprecations
- Rework Sinks specs to put unsafe() at root level (#2418)
- Rename Emission to EmitResult (#2426)
- Remove deprecated emit API (#2377)
- Deprecate [Flux|Mono]Processor contracts entirely (#2431)
β¨ New features and improvements
- Add
emitXxx(EmitFailureHandler)
Sinks API (#2377) - Add firstWithValue operator, alias/deprecate first (#2173)
- VoidProcessor is now a pure empty sink (#2408)
- Add serialized wrappers for
Sinks.Empty/Sinks.One
(#2410) - Add currentSubscriberCount() to
Sinks.Many|One|Empty
(#2372) - Make sinks scannable for TERMINATED (and CANCELLED) (#2394)
- Add directAllOrNothing/directBestEffort multicast Sinks (#2392)
- Change
GroupedFlux#key
to@NonNull
(#2397)
πͺ² Bug fixes
- Fix concurrent terminal signal detection in
SerializedManySink
(#2412) - Fix potential integer overflow on
BoundedElasticScheduler
constructor (#2389)
π Documentation, Tests and Build
- correct marbles for transformDeferred (#2358)
- fix windowWithBoundary marble diagram (#2346)
- Don't blanket hide deprecated members in javadoc (#2416)
- Bump jcstress-gradle-plugin to natively fix jar classifier (#2429)
- use a different name for the jcstress jar (#2400)
- [polish] Increase timeout duration to 1ms to avoid hiccups
- [build] Polish granularity of stacks for Nested tests
- [polish] StressSubscriber generified, track onSubscribe, initRequest
- [doc] Polish Sinks doc accounting for RC1 and RC2 latest changes (#2414)
- [test] Polish tests that use nano durations to avoid flakkyness (#2421)