public static <T>ParallelFlux<T> from(Publisher<? extends T> source,int parallelism,int prefetch,Supplier<Queue<T>> queueSupplier){
  if (parallelism <= 0) {
    throw new IllegalArgumentException("parallelism > 0 required but it was " + parallelism);
  }
  if (prefetch <= 0) {
    throw new IllegalArgumentException("prefetch > 0 required but it was " + prefetch);
  }
  Objects.requireNonNull(queueSupplier,"queueSupplier");
  Objects.requireNonNull(source,"queueSupplier");
  return onAssembly(new ParallelUnorderedSource<>(source,parallelism,prefetch,queueSupplier));
}

public static < T > ParallelFlux < T > from ( Publisher < ? extends T > source , int parallelism , int prefetch , Supplier < Queue < T > > queueSupplier ) { if ( parallelism <= 0 ) { throw new IllegalArgumentException ( "parallelism > 0 required but it was " + parallelism ) ; } if ( prefetch <= 0 ) { throw new IllegalArgumentException ( "prefetch > 0 required but it was " + prefetch ) ; } Objects . requireNonNull ( queueSupplier , "queueSupplier" ) ; Objects . requireNonNull ( source , "queueSupplier" ) ; return onAssembly ( new ParallelUnorderedSource < > ( source , parallelism , prefetch , queueSupplier ) ) ; }
take a publisher and prepare to consume it on parallallism number of ' rails ' and round - robin fashion and use custom prefetch amount and queue for dealing with the source publisher ' s values .
