These are chat archives for ReactiveX/RxJava

3rd
Dec 2016
Serban Balamaci
@balamaci
Dec 03 2016 10:02
Hi guys, just to confirm my understanding of the backpressure operators:
    Flowable<Integer> flowable = subject
                .toFlowable(BackpressureStrategy.MISSING)
                .onBackpressureBuffer(5)
                .onBackpressureDrop(val -> log.info("Dropped {}", val));
        flowable = flowable.observeOn(Schedulers.io(), false, 3);
        subscribeWithSlowSubscriber(flowable);
this is not working in a way like buffer 5 elements on overflow and then start dropping events
because backpressureDrop subscribes to the previous backpressureBuffer operator and requests Long.MAX_VALUE from it, so backpressureBuffer always sees that the downstream is ready for all it has, so it never overflows
Serban Balamaci
@balamaci
Dec 03 2016 10:08
so the only backpressure action happens in onBackpressureDrop
Serban Balamaci
@balamaci
Dec 03 2016 13:20
Hi @akarnokd , I know about the overloaded onBackpressureBuffer, I just wanted to validate that it makes no sense to chain onBackpresureXXX one after another
and I also think it makes no sense to have any BackpressureStrategy other than MISSING in Flowable.create() if you plan to follow it with an onBackpressureXXX.
Serban Balamaci
@balamaci
Dec 03 2016 13:36
Incidently it seem in reactor-core there is no equivalent of the rxjava's variant of onBackpressure with and Action and an overflowStrategy
David Karnok
@akarnokd
Dec 03 2016 17:59
They are a bit behind with appropriating features from RxJava 2, even so they have now two dedicated and financed persons for that.