PublishSubject with backpressure in RxJava 2.x
I used at some point something like this:
Subject<Object> emitterSubject = PublishSubject.<Object>create().toSerialized();
emitterSubject.toFlowable(BackpressureStrategy.LATEST)
In 2.x the backpressure was moved to the base type Flowable and its hot partners PublishProcessor, ReplayProcessor etc.
PublishProcessor<Integer> pp = PublishProcessor.create();
Flowable<Integer> out = pp.onBackpressureLatest();