mergeDelayError not delaying errors when subscribing to schedulers
See original GitHub issueWhen two observables are merged with mergeDelayError and the resulting observable is subscribed to a scheduler, then errors are not delayed. Example:
Observable.mergeDelayError(
Observable.error(new RuntimeException()),
Observable.just("Hello")
)
.subscribeOn(Schedulers.io()).subscribe(observer);
In this case “hello” will never be emitted. Also mentioned in this SO question: http://stackoverflow.com/questions/32131594/rx-java-mergedelayerror-not-working-as-expected
Issue Analytics
- State:
- Created 8 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Rx Java mergeDelayError not working as expected
terminate the merged Observable. seems clear from the diagram that any error is delayed until after all others are completed, and then is...
Read more >Delay operator for Observable.error - Google Groups
I have a question about the expected behaviour of the delay operator ... entire set of mergeDelayError and ReplaySubject does in fact put...
Read more >Single (RxJava Javadoc 2.2.13)
Concatenate the single values, in a non-overlapping fashion, ... Delays the actual subscription to the current Single until the given time delay elapsed....
Read more >Maybe (RxJava Javadoc 3.0.10) - ReactiveX
Concatenates a sequence of MaybeSource s eagerly into a Flowable sequence, delaying errors until all inner MaybeSource s terminate.
Read more >Error Handling With Observable Sequences | RxJS
subscribe ( data => { // Display the data as it comes in } );. This isn't the only way to handle errors...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m still facing this issue using v.1.0.14.
Test that reproduce the case:
Test output:
The original ReactiveX design favored fail-fast streams. An async boundary such as
observeOn
has the opportunity to see both the elements of the source thread and the exception that came after in that thread. SinceobserveOn
with the fail-fast behavior was very established when this property started causing confusion, we had no choice but to overload and parametrize the error handling behavior. I’d say you have it better because Rx.NET’s suggested solution was to materialize and dematerialize the stream to overcome this property…