Apply retries in a RXjava
问题 I want to run a method with retries using RXJava return Observable .just(myObj) .flatMap(doc -> myFunc(myObj, ....) ) .doOnError(e -> log.Error()) .onErrorResumeNext(myObj2 -> methodIWantToRunWithRetries(...) .onErrorResumeNext(myObj3 -> methodIWantToRunWithRetries(...) ) ); } If I use onErrorResumeNext I need to nest it as many times I want my retries. (unless I want to surround it with try/catch) Is there an option to implement it with RXJava methods? 回答1: RxJava offers standard retry