You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.x the difference between Observer and Subscriber is that a Subscriber allows to subscribe and unsubscribe, however an Observer only allows to subscribe.
But in 2.x Observer is used to subscribe to an Observable, and Subscriber is used to subscribe to a Flowable. And if you want to be able to unsubscribe, you need to use ResourceObserver and ResourceSubscriber respectively.
Is that right?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi, I realise this is an old issue but I'd like some further clarification.
The distinction between a Subscriber and an Observer is that Subscribers are part of the Reactive Stream specification, where the first rule of Subscribers is that they must "MUST signal demand via Subscription.request(long n) to receive onNext signals."
Since Observables don't have backpressure support, and therefore don't signal demand via request(long n), they use Observer, which doesn't have the request method.
Since Observables don't have backpressure support, there is no need for a Subscription with a request() method. To avoid some confusion, separate "connection" types is employed: Disposable with a dispose() method that is analogous to Subscription.cancel().
In 1.x the difference between Observer and Subscriber is that a Subscriber allows to subscribe and unsubscribe, however an Observer only allows to subscribe.
But in 2.x Observer is used to subscribe to an Observable, and Subscriber is used to subscribe to a Flowable. And if you want to be able to unsubscribe, you need to use ResourceObserver and ResourceSubscriber respectively.
Is that right?
Thanks.
The text was updated successfully, but these errors were encountered: