Creates an unbounded replay subject.
Creates an unbounded replay subject.
Creates a size-bounded replay subject.
Creates a size-bounded replay subject.
In this setting, the ReplaySubject holds at most size items in its internal buffer and discards the oldest item.
NOTE: the capacity
is actually grown to the next power of 2 (minus 1),
because buffers sized as powers of two can be more efficient and the
underlying implementation is most likely to be a ring buffer. So give it
300
and its capacity is going to be 512 - 1