Writing in Java I call zip() method that receives a few method that return an Observable<...>.
Currently I am not able to progress to the following map and this is probably due to the fact that one of the methods didn't return a value yet. (Though it seems all methods where called.)
Is there a way to debug the process and see why it is stuck?
Thanks.
Suppose you have:
result = Observable.zip(sourceA, sourceB, sourceC)
Just add a .doOnNext() on each of the sources to log what they are emitting (or instead of doOnNext, subscribe to each). For instance:
result = Observable.zip(sourceA.doOnNext(/*logging...*/),
sourceB.doOnNext(/*logging...*/),
sourceC.doOnNext(/*logging...*/))
What's probably happening is that one of these sources isn't emitting at the same frequency as the others. zip must be used when you strictly know that all the sources emit events at the same pace/frequency. You might want to try using combineLatest. The difference between the two are:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With