Reactive Mono, Flux, map, flatMap, filter, reduce and zip

Reactive Mono, Flux, map, flatMap, filter, reduce and zip
Photo by YF Wu / Unsplash

my 2 cents understanding about Mono, Flux and its usages.

Mono is a single object publisher

Mono (reactor-core 3.5.3)

Flux is an array objects publisher

Flux (reactor-core 3.5.3)

use map to transform for any sync operations

use flatMap to transform for any async operations

use Mono.zip to aggregate multiple monos into a new Mono

Aggregate given monos into a new Mono that will be fulfilled when all of the given Monos have produced an item, aggregating their values according to the provided combinator function. An error or empty completion of any source will cause other sources to be cancelled and the resulting Mono to immediately error or complete, respectively.

Mono (reactor-core 3.5.3)

Subscribe to Post, Code and Quiet Time.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe