reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final <K, V> Mono<Map<K, V>> collectMap(Function<? super T, ? extends K> keyExtractor,
			Function<? super T, ? extends V> valueExtractor) {
		return collectMap(keyExtractor, valueExtractor, () -> new HashMap<>());
	}
public final <K, V> Mono<Map<K, V>> collectMap(Function<? super T, ? extends K> keyExtractor,
			Function<? super T, ? extends V> valueExtractor) {
		return collectMap(keyExtractor, valueExtractor, () -> new HashMap<>());
	}
Collect all elements emitted by this {@link Flux} into a hashed {@link Map} that is
emitted by the resulting {@link Mono} when this sequence completes.
The key is extracted from each element by applying the {@code keyExtractor}
{@link Function}, and the value is extracted by the {@code valueExtractor} Function.
In case several elements map to the same key, the associated value will be derived
from the most recently emitted element.

<p>
<img class="marble" src="doc-files/marbles/collectMapWithKeyAndValueExtractors.svg" alt="">

@reactor.discard This operator discards the buffer upon cancellation or error triggered by a data signal.

@param keyExtractor a {@link Function} to map elements to a key for the {@link Map}
@param valueExtractor a {@link Function} to map elements to a value for the {@link Map}

@param <K> the type of the key extracted from each source element
@param <V> the type of the value extracted from each source element

@return a {@link Mono} of a {@link Map} of key-element pairs (only including latest
element's value in case of key conflicts)