Summary
In this chapter, you learned about Flowable and backpressure and the situations in which they should be preferred over an Observable. A Flowable is especially useful when the application uses concurrency and a lot of data can flow through it, as it regulates how much data comes from the source at a given time. Some Flowable objects, such as Flowable.interval() or those derived from an Observable, do not have backpressure implemented. In these situations, you can use onBackpressureXXX() operators to queue or drop emissions for the downstream. If you are creating your own Flowable source from scratch, prefer to use the existing Flowable factories. If that fails, use Flowable.generate() instead of Flowable.create().
If you have reached ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access