title: RX Java - Retry some code that throws exception
body: <p>I'm trying to use RX Java to consume some data coming from a source that keeps sending objects.</p>
  
  <p>I'm wondering how to implement a retry policy for cases in which my own code throws an exception. For example a network exception should trigger a retry with exponential backoff policy.</p>
  
  <p>Some code : </p>
  
  <pre><code> message.map(this::processMessage)
                   .subscribe((message)-&gt;{
                       //do something after mapping
                   });
  </code></pre>
  
  <p><code>processMessage(message)</code> is the method which contains the risky code that might fail and its the part of code that I want to retry but I dont want to stop the observable from consuming data from the source.</p>
  
  <p>Any thoughts on this?</p>