src/main/java/io/reactivex/processors/ReplayProcessor.java
@CheckReturnValue
    @NonNull
    public static <T> ReplayProcessor<T> createWithSize(int maxSize) {
        return new ReplayProcessor<T>(new SizeBoundReplayBuffer<T>(maxSize));
    }
@CheckReturnValue
    @NonNull
    public static <T> ReplayProcessor<T> createWithSize(int maxSize) {
        return new ReplayProcessor<T>(new SizeBoundReplayBuffer<T>(maxSize));
    }
Creates a size-bounded ReplayProcessor.
<p>
In this setting, the {@code ReplayProcessor} holds at most {@code size} items in its internal buffer and
discards the oldest item.
<p>
When {@code Subscriber}s subscribe to a terminated {@code ReplayProcessor}, they are guaranteed to see at most
{@code size} {@code onNext} events followed by a termination event.
<p>
If a {@code Subscriber} subscribes while the {@code ReplayProcessor} is active, it will observe all items in the
buffer at that point in time and each item observed afterwards, even if the buffer evicts items due to
the size constraint in the mean time. In other words, once a {@code Subscriber} subscribes, it will receive items
without gaps in the sequence.

@param <T>
the type of items observed and emitted by this type of processor
@param maxSize
the maximum number of buffered items
@return the created processor