The last loss-less strategy to deal with backpressure we will see is the controlled() operator. This operator gives the programmer full control of buffers as it lets you buffer all data and request for the amount of data you want anytime.
This operator has the following signature:
As you can, see this method doesn't receive any parameters.
After creating a controlled() observable, you can use the method request() to request for a given number of items. The request() method has the following signature:
The parameter count is mandatory:
- count: This is the number of items to be pulled from the Observable (if absent, it defaults to zero).
An example usage ...