2
votes

I am using RxJava 2 Flowable with DROP BackPressure strategy. Is there any way to collect information / stats about how many messages are actually dropped because of the BackPressure?

Solution

Flowable#onBackpressureDrop(consumer -> {}); http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/Flowable.html#onBackpressureDrop(io.reactivex.functions.Consumer)

1
There is an overload that takes an onDrop handler you can use for counting. - akarnokd

1 Answers

2
votes

There is an overload that takes an onDrop handler you can use for counting.

Generally, it is advised to check an operator's overloads for additional features.