reactor-core/src/main/java/reactor/core/publisher/Flux.java
public static <T> Flux<T> switchOnNext(Publisher<? extends Publisher<? extends T>> mergedPublishers, int prefetch) {
		return onAssembly(new FluxSwitchMap<>(from(mergedPublishers),
				identityFunction(),
				Queues.unbounded(prefetch), prefetch));
	}
public static <T> Flux<T> switchOnNext(Publisher<? extends Publisher<? extends T>> mergedPublishers, int prefetch) {
		return onAssembly(new FluxSwitchMap<>(from(mergedPublishers),
				identityFunction(),
				Queues.unbounded(prefetch), prefetch));
	}
public static < T > Flux < T > switchOnNext ( Publisher < ? extends Publisher < ? extends T > > mergedPublishers , int prefetch ) { return onAssembly ( new FluxSwitchMap <> ( from ( mergedPublishers ) , identityFunction ( ) , Queues . unbounded ( prefetch ) , prefetch ) ) ; }
Creates a {@link Flux} that mirrors the most recently emitted {@link Publisher},
forwarding its data until a new {@link Publisher} comes in in the source.
<p>
The resulting {@link Flux} will complete once there are no new {@link Publisher} in
the source (source has completed) and the last mirrored {@link Publisher} has also
completed.
<p>
<img class="marble" src="doc-files/marbles/switchOnNext.svg" alt="">

@param mergedPublishers The {@link Publisher} of {@link Publisher} to switch on and mirror.
@param prefetch the inner source request size
@param <T> the produced type

@return a {@link FluxProcessor} accepting publishers and producing T
Creates a { @link Flux } that mirrors the most recently emitted { @link Publisher } forwarding its data until a new { @link Publisher } comes in in the source . <p > The resulting { @link Flux } will complete once there are no new { @link Publisher } in the source ( source has completed ) and the last mirrored { @link Publisher } has also completed . <p > <img class = marble src = doc - files / marbles / switchOnNext . svg alt = >