Wins
Wins

Reputation: 3460

What's the difference between Flux.concatMapIterable and Flux.flatMapIterable?

As subject, both Flux.concatMapIterable and Flux.flatMapIterable are not interleaved according to the marble diagram, unlike Flux.concatMap and Flux.flatMap which the flatMap is interleaved according to the marble diagram.

The Flux.concatMapIterable diagram is

concatMapIterable

And the Flux.flatMapIterable diagram is flatMapIterable

Both resulting in sequence output.

Upvotes: 1

Views: 1666

Answers (1)

Simon Baslé
Simon Baslé

Reputation: 28301

These two methods are effectively aliases of each other, both will consume each Iterable fully before processing the next one. This was just aliased for better discoverability in the API.

However, the marble diagram should be the same (concat one) in both methods, I'll fix that...

Upvotes: 3

Related Questions