title: Apply retries in a RXjava
body: <p>I want to run a method with retries using RXJava</p>
  
  <pre><code>return Observable
          .just(myObj)
          .flatMap(doc -&gt;
                  myFunc(myObj, ....)
          )
          .doOnError(e -&gt; log.Error())
          .onErrorResumeNext(myObj2 -&gt;
                  methodIWantToRunWithRetries(...)
                          .onErrorResumeNext(myObj3 -&gt;
                                  methodIWantToRunWithRetries(...)
                          )
  
          );
  }
  </code></pre>
  
  <p>If I use <code>onErrorResumeNext</code> I need to nest it as many times I want my retries.<br>
  (unless I want to surround it with try/catch)</p>
  
  <p>Is there an option to implement it with RXJava methods?</p>