Reactor offers ParallelFlux, which is capable of splitting an existing stream into multiple streams in a round-robin manner. ParallelFlux is created from an existing Fluxusing the parallel operator. By default, this splits the stream into the total number of CPU cores that are available. ParallelFlux only divides the stream, and does not change the execution model. Instead, it executes the streams on the default thread—the main thread. The divided stream can be configured for parallel processing by using the runOn operator. Similar to the publishOn operator, the runOn takes a scheduler and executes the downstream on the specified scheduler.

It is important to note that ParallelFlux does not offer the doFinally life cycle hook. ...

Get Hands-On Reactive Programming with Reactor now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.