Search⌘ K

Subscriber

Explore how to use a Subscriber in RxJava to control data consumption from a producer, managing backpressure with Flowable and Subscription methods. This lesson teaches how to request and limit data flow efficiently, essential for handling resource constraints like caching in reactive Android apps.

We'll cover the following...

Use a Subscriber to allow fine-grained control of how a consumer notifies a producer that it can consume more data. In addition to the standard observer methods .onNext(T), .onError(Throwable), and .onComplete(), a Subscriber has an additional method, .onSubscribe(Subscription), which is called upon subscribing to a producer ( Flowable). The ...