If an Observable has not been written to support reactive pull backpressure (such support is not a requirement for Observables), you can apply one of the following operators to it, each of which forces a simple form of backpressure behavior:
onBackpressureBufferonBackpressureDropMissingBackpressureException which you will be notified of via
your onError callback.
There are, however, other options. You can throttle an over-producing Observable with operators like
sample/throttleLast, throttleFirst, or throttleWithTimeout/debounce.
You can also take the large number of items emitted by an over-producing Observable and package them into
a smaller set of emissions by using operators like buffer and window.
For a more complete discussion of the options available to you for dealing with issues related to backpressure and flow control in RxJava, see RxJava wiki: Backpressure.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MissingBackpressureException(String
the customized message message)Constructs the exception with the given customized message. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| MissingBackpressureException | back to summary |
|---|---|
| public MissingBackpressureException() Constructs the exception without any custom message. | |
| MissingBackpressureException | back to summary |
|---|---|
| public MissingBackpressureException(String message) Constructs the exception with the given customized message.
| |