Class MissingBackpressureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- rx.exceptions.MissingBackpressureException
-
- All Implemented Interfaces:
java.io.Serializable
public class MissingBackpressureException extends java.lang.Exception
Represents an exception that indicates that a Subscriber or operator attempted to apply reactive pull backpressure to an Observable that does not implement it.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:
onBackpressureBuffer
- maintains a buffer of all emissions from the source Observable and emits them to downstream Subscribers according to the requests they generate
onBackpressureDrop
- drops emissions from the source Observable unless there is a pending request from a downstream Subscriber, in which case it will emit enough items to fulfill the request
MissingBackpressureException
which you will be notified of via youronError
callback.There are, however, other options. You can throttle an over-producing Observable with operators like
sample
/throttleLast
,throttleFirst
, orthrottleWithTimeout
/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 likebuffer
andwindow
.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.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description MissingBackpressureException()
Constructs the exception without any custom message.MissingBackpressureException(java.lang.String message)
Constructs the exception with the given customized message.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MissingBackpressureException
public MissingBackpressureException()
Constructs the exception without any custom message.
-
MissingBackpressureException
public MissingBackpressureException(java.lang.String message)
Constructs the exception with the given customized message.- Parameters:
message
- the customized message
-
-