This is the 3rd milestone of Reactor 3.2.0, part of Californium-M1 Pre-Release Train.
This milestone contains quite a few bugfixes and improvements, but the main highlight is the introduction of a hook for cleanup of elements that either get filtered out of a sequence or are accumulated by prefetch mechanisms but never emitted (due to cancellation or error).
See #999 for discussion around this topic, feedback is welcome!
Another notable change, this time in the way we work with the repository and contributions that make sense for maintenance releases: as of commit 0d8e16e, there will be no more port #xxx backport commits in maintenance branches, but rather issues will be fixed first in the maintenance branch THEN a forward-merge will happen to include the fix in the master branch. See #1225.
⚠️ Update considerations and deprecations
- The constant
Schedulers.DEFAULT_POOL_SIZEis now used internally (notably bySchedulers.[new]parallel()), but unlike before it doesn't enforce a minimum of4anymore. It can be tuned via system propertyreactor.schedulers.defaultPoolSizenow though (#1243, #1246) repeat(N)is now aligned withretry(N), as well asrepeat(N, Predicate)/retry(N, Predicate): the number indicates the amount of repetitions of the original sequence, ie0mirrors the original sequence while1mirrors the original sequence + an additional repetition of it. Negative values are rejected at assembly time. (#1252)- look out for usage of
repeat(long)in your code and decrement the passed parameter by one repeat(0)should be replaced withFlux/Mono.empty()
- look out for usage of
errorStrategyContinue()methods from M1 have been renamed toonErrorContinueto reuse the same prefix as other error handling methods, event though this one has a mechanism that is quite different (#1287)Flux#metrics()from M2 has been refined, and some tags renamed (#1245, #1242, #1250)
✨ New features and improvements
- ⭐ Add
onDiscardhook for clean disposal of elements that never make it to user code (#999) - The default
Schedulerpool size is now configurable via a system property (#1243) Flux#metrics()from M2 has been refined, and some tags renamed (#1245, #1242, #1250)- In the case where a
QueueSubscriptionis logged vialog()during anonNext, itstoStringmethod is explicitly called (#1270)- typically this would happen when using
window()immediately followed bylog(), which is not really useful but was even less useful since it would trigger an exception
- typically this would happen when using
Tuple2..Tuple8now havemapT1..mapT8(as relevant) methods that allow to change a single part of theTuple(e4a9aee, discussed in #1058)usingWhenfrom M2 can now be cancelled early before the resourcePublisheremitted, which cancels saidPublisher. As a consequence this operator doesn't implement micro-fusion anymore (#1233)
🪲 Bug fixes
- When using a non-compliant
TestPublisher, calling.mono()would turn it into a compliant one. This has been fixed and the mono will now continue to be a bad boy (#1244) - A few
bufferTimeoutandbufferWhenissues have been corrected around cancellation and drain race conditions (#1247) - The
usingWhenoperator from M2 wouldn't propagate the main sequence'sContextto commit/rollbackPublishers (#1259)
📖 Documentation, Tests and Build
- ⭐ Contributing Guidelines have been totally reworked and reflect the new organisation, notably in terms of labels and branching (see highlights at the top, d166557, #1225)
- Various clarifications have been made in the javadoc, including marble diagram fixes (#1240, #1266, #1079)
- Some reference documentation error fallback snippets were wrong (#1269)
- Java 9 build has been fully reactivated now that every build component is Java 9 compatible (right on time for Java 9 EoL 😁 see 2b4bf5e, 209a45f, #896, e239d65)
- Kotlin has been bumped to
1.2.51(#1274)