src/main/java/io/reactivex/internal/operators/observable/ObservableReplay.java
public static <T> ConnectableObservable<T> create(ObservableSource<T> source,
            final int bufferSize) {
        if (bufferSize == Integer.MAX_VALUE) {
            return createFrom(source);
        }
        return create(source, new ReplayBufferSupplier<T>(bufferSize));
    }
public static <T> ConnectableObservable<T> create(ObservableSource<T> source,
            final int bufferSize) {
        if (bufferSize == Integer.MAX_VALUE) {
            return createFrom(source);
        }
        return create(source, new ReplayBufferSupplier<T>(bufferSize));
    }
Creates a replaying ConnectableObservable with a size bound buffer.
@param <T> the value type
@param source the source ObservableSource to use
@param bufferSize the maximum number of elements to hold
@return the new ConnectableObservable instance