When to use Flowables?

The following are the situations when you should consider using Flowables. Remember, Flowables are slower than Observables:

  • Flowables and backpressure are meant to help deal with larger amounts of data. So, use flowable if your source may emit 10,000+ items. Especially when the source is asynchronous so that the consumer chain may ask the producer to limit/regulate emissions when required.
  • If you are reading from/parsing a file or database.
  • When you want to emit from network IO operations/Streaming APIs that support blocking while returning results, which is how many IO sources work.

Get Reactive Programming in Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.