rx-java2

Are subscribers in Spring Reactor unbounded by default?

北战南征 提交于 2020-07-15 08:47:39
问题 I've been working in Spring Reactor and had some previous testing that made me wonder how Fluxes handle backpressure by default. I know that onBackpressureBuffer and such exist, and I have also read that RxJava defaults to unbounded until you define whether to buffer, drop, etc. So, can anyone clarify for me: What is the default backpressure behavior for a Flux in Reactor 3? I tried searching for the answer but didn't find any clear answers, only definitions of Backpressure or that answer

Are subscribers in Spring Reactor unbounded by default?

只愿长相守 提交于 2020-07-15 08:47:13
问题 I've been working in Spring Reactor and had some previous testing that made me wonder how Fluxes handle backpressure by default. I know that onBackpressureBuffer and such exist, and I have also read that RxJava defaults to unbounded until you define whether to buffer, drop, etc. So, can anyone clarify for me: What is the default backpressure behavior for a Flux in Reactor 3? I tried searching for the answer but didn't find any clear answers, only definitions of Backpressure or that answer

RxJava: Observable and default thread

强颜欢笑 提交于 2020-06-27 07:16:18
问题 I have the following code: Observable.create(new ObservableOnSubscribe<String>() { @Override public void subscribe(@NonNull final ObservableEmitter<String> s) throws Exception { Thread thread = new Thread(new Runnable() { @Override public void run() { s.onNext("1"); s.onComplete(); } }); thread.setName("background-thread-1"); thread.start(); } }).map(new Function<String, String>() { @Override public String apply(@NonNull String s) throws Exception { String threadName = Thread.currentThread()

Architecture Components Retrofit and RxJava 2 error handling

断了今生、忘了曾经 提交于 2020-06-24 14:09:09
问题 I am currently trying to implement the new ViewModels in the architecture components with an API request from retrofit and Okhttp, everything is working but I can't figure out how to pass an error response from retrofit to LiveDataReactiveStreams.fromPublisher and then upstream to the observer in the fragment. This is what I have so far: public class ShowListViewModel extends AndroidViewModel { private final ClientAdapter clientAdapter; private LiveData<List<Show>> shows; public