Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RxJava - Where did AbstractOnSubscribe go in 1.1.0?

Tags:

java

rx-java

Version 1.1.0 just came out and it looks like they dropped rx.observables.AbstractOnSubscribe

Removals from Public API

  • Observable.onBackpressureBlock
  • rx.observables.AbstractOnSubscribe
  • Removal of stateful methods from the generic rx.subjects.Subject abstract class

AbstractOnSubscribe was my preferred way of creating non-trivial observables. Why was it removed, and what's can I replace it with?

like image 218
Malt Avatar asked Nov 27 '25 05:11

Malt


1 Answers

AbstractOnSubscribe was marked as experimental thus always carried the chance of being removed.

The class has been replaced by SyncOnSubscribe which works roughly the same but with internals that have lower overhead; this required API changes (i.e., thinner API than the State object).

You can use the many factory methods to create your OnSubscribe instance or extend SyncOnSubscribe directly.

like image 181
akarnokd Avatar answered Nov 28 '25 20:11

akarnokd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!