reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final <R> Flux<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper) {
		return flatMap(mapper, Queues.SMALL_BUFFER_SIZE, Queues
				.XS_BUFFER_SIZE);
	}
public final <R> Flux<R> flatMap(Function<? super T, ? extends Publisher<? extends R>> mapper) {
		return flatMap(mapper, Queues.SMALL_BUFFER_SIZE, Queues
				.XS_BUFFER_SIZE);
	}
Transform the elements emitted by this {@link Flux} asynchronously into Publishers,
then flatten these inner publishers into a single {@link Flux} through merging,
which allow them to interleave.
<p>
There are three dimensions to this operator that can be compared with
{@link #flatMapSequential(Function) flatMapSequential} and {@link #concatMap(Function) concatMap}:
<ul>
<li><b>Generation of inners and subscription</b>: this operator is eagerly
subscribing to its inners.</li>
<li><b>Ordering of the flattened values</b>: this operator does not necessarily preserve
original ordering, as inner element are flattened as they arrive.</li>
<li><b>Interleaving</b>: this operator lets values from different inners interleave
(similar to merging the inner sequences).</li>
</ul>
<p>
<img class="marble" src="doc-files/marbles/flatMapForFlux.svg" alt="">
<p>

@reactor.discard This operator discards elements internally queued for backpressure upon cancellation or error triggered by a data signal.

@param mapper the {@link Function} to transform input sequence into N sequences {@link Publisher}
@param <R> the merged output sequence type

@reactor.errorMode This operator supports {@link #onErrorContinue(BiConsumer) resuming on errors}
in the mapper {@link Function}. Exceptions thrown by the mapper then behave as if
it had mapped the value to an empty publisher. If the mapper does map to a scalar
publisher (an optimization in which the value can be resolved immediately without
subscribing to the publisher, e.g. a {@link Mono#fromCallable(Callable)}) but said
publisher throws, this can be resumed from in the same manner.

@return a new {@link Flux}