title: How to filter response with delay and retries : RxJava
body: <p>Beginner to RxJava, one of the ask is to call a method which is returning observable boolean.  If the method returns true than exit, if false than retry.  It needs to be done multiple times with a logic of delay.  For e.g in every 30 seconds it will retry if value is true.</p>
  
  <p>Here is my observable method</p>
  
  <pre><code>@RxLogObservable
      public rx.Observable&lt;Boolean&gt; checkForCatalogDownloadSuccess() {
          return rx.Observable.create(new rx.Observable.OnSubscribe&lt;Boolean&gt;() {
              @Override
              public void call(Subscriber&lt;? super Boolean&gt; subscriber) {
                  try {
                      String catalogDownloadStatus = mSnappyDBManager.getStringFromSnappy(SnappyDBManager.CATALOG_DOWNLOAD_STATUS);
                      CatalogDownloadStatus downloadStatus = CatalogDownloadStatus.valueOf(catalogDownloadStatus);
                      CatalogDownloadResponse catalogDownloadResponse = new CatalogDownloadResponse();
  
                      if(downloadStatus == CatalogDownloadStatus.SUCCESS ) {
                          subscriber.onNext(true);
                      }
                      else {
                      subscriber.onNext(false);
                      }
  
                      subscriber.onCompleted();
  
                  } catch (Exception ex) {
                      Timber.e(ex, null);
                  }
              }
          };
      }
  </code></pre>