src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final ConnectableFlowable<T> publish(int bufferSize) {
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return FlowablePublish.create(this, bufferSize);
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final ConnectableFlowable<T> publish(int bufferSize) {
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return FlowablePublish.create(this, bufferSize);
    }
Returns a {@link ConnectableFlowable}, which is a variety of Publisher that waits until its
{@link ConnectableFlowable#connect connect} method is called before it begins emitting items to those
{@link Subscriber}s that have subscribed to it.
<p>
<img width="640" height="510" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/publishConnect.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The returned {@code ConnectableFlowable} honors backpressure for each of its {@code Subscriber}s
and expects the source {@code Publisher} to honor backpressure as well. If this expectation is violated,
the operator will signal a {@code MissingBackpressureException} to its {@code Subscriber}s and disconnect.</dd>
<dt><b>Scheduler:</b></dt>
<dd>{@code publish} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param bufferSize
the number of elements to prefetch from the current Flowable
@return a {@link ConnectableFlowable} that upon connection causes the source Publisher to emit items
to its {@link Subscriber}s
@see <a href="http://reactivex.io/documentation/operators/publish.html">ReactiveX operators documentation: Publish</a>