reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final <V, C extends Collection<? super V>> Flux<T> distinct(
			Function<? super T, ? extends V> keySelector,
			Supplier<C> distinctCollectionSupplier) {
		return this.distinct(keySelector, distinctCollectionSupplier, Collection::add, Collection::clear);
	}
public final <V, C extends Collection<? super V>> Flux<T> distinct(
			Function<? super T, ? extends V> keySelector,
			Supplier<C> distinctCollectionSupplier) {
		return this.distinct(keySelector, distinctCollectionSupplier, Collection::add, Collection::clear);
	}
public final < V , C extends Collection < ? super V > > Flux < T > distinct ( Function < ? super T , ? extends V > keySelector , Supplier < C > distinctCollectionSupplier ) { return this . distinct ( keySelector , distinctCollectionSupplier , Collection :: add , Collection :: clear ) ; }
For each {@link Subscriber}, track elements from this {@link Flux} that have been
seen and filter out duplicates, as compared by a key extracted through the user
provided {@link Function} and by the {@link Collection#add(Object) add method}
of the {@link Collection} supplied (typically a {@link Set}).

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

@reactor.discard This operator discards elements that don't match the distinct predicate,
but you should use the version with a cleanup if you need discarding of keys
categorized by the operator as "seen". See {@link #distinct(Function, Supplier, BiPredicate, Consumer)}.

@param keySelector function to compute comparison key for each element
@param distinctCollectionSupplier supplier of the {@link Collection} used for distinct
check through {@link Collection#add(Object) add} of the key.

@param <V> the type of the key extracted from each value in this sequence
@param <C> the type of Collection used for distinct checking of keys

@return a filtering {@link Flux} only emitting values with distinct keys
For each { @link Subscriber } track elements from this { @link Flux } that have been seen and filter out duplicates as compared by a key extracted through the user provided { @link Function } and by the { @link Collection#add ( Object ) add method } of the { @link Collection } supplied ( typically a { @link Set } ) .