I understand that usage of Observable.create
is discouraged in RxJava due to lack of backpressure support. Due to this, I've taken to using the new Observable.fromAsync
to wrap callback API's, as it handles backpressure with otherwise seemingly the same behaviour as Observable.create
.
However in these draft docs, the suggestion seems to be that exposing my created observable like below should solve this issue:
Observable<T> observable = Observable.create(onSubscribe).onBackpressureBuffer();
Is this correct? At this point what is the difference between the two operators? If this isn't correct, is there ever any justification to use .create
over .fromAsync
?