map vs flatMap in reactor
map is for synchronous, non-blocking, 1-to-1 transformations flatMap is for asynchronous (non-blocking) 1-to-N transformations The difference is visible in the method signature: map takes a Function<T, U> and returns a Flux<U> flatMap takes a Function<T, Publisher<V>> and returns a Flux<V> That’s the major hint: you can pass a Function<T, Publisher<V>> to a map, but it … Read more