February 2020
Intermediate to advanced
412 pages
9h 36m
English
Leveraging Flowable.create() to create a Flowable feels much like Observable.create(), but there is one critical difference: you must specify a BackpressureStrategy as a second argument. It indicates which of the canned backpressure supporting algorithms to use. The choice is to cache or to drop emissions or not implement backpressure at all.
Here, we use Flowable.create() to create a Flowable. As a backpressure supporting strategy, we provide a second BackpressureStrategy.BUFFER argument to buffer the emissions before they are backpressured, as shown in the following code example:
import io.reactivex.rxjava3.core.BackpressureStrategy;import io.reactivex.rxjava3.core.Flowable;import io.reactivex.rxjava3.schedulers.Schedulers; ...
Read now
Unlock full access