I'm trying to get acquainted with the problem of reactive backpressure processing, in particular by reading this wiki: https://github.com/ReactiveX/RxJava/wiki/Backpressure
In the buffer paragraph , we have this more attractive code example:
Observable<Integer> burstyMulticast = bursty.publish().refCount();
Observable<Integer> burstyDebounced = burstMulticast.debounce(10, TimeUnit.MILLISECONDS);
Observable<List<Integer>> burstyBuffered = burstyMulticast.buffer(burstyDebounced);
If I understand correctly, we are effectively debugging a discontinuous source stream, generating a debugged signal stream for the buffer operator.
But why do we need to use the publish and refcount operators? What problem would arise if we just dropped them? Comments don't make me clearer to me, aren't RxJava Observables up to multicast by default?