title: RxJava - Flowable.map not getting called after flatMap
body: <p>I am having weird issue with the Flowable&lt;T&gt; vs Observable&lt;T&gt; in rxjava (io.reactivex.rxjava2 - v2.0.8). Here I have code that looks like below, where <strong>map(...).subscribe(...)</strong> functions are not getting called / executed.</p>
  
  <pre><code>flowable.flatMap(...return new flowable...).map(...).subscribe(...)
  </code></pre>
  
  <p>Surprisingly, if I flip my code to make use of Observable&lt;T&gt; instead of Flowable&lt;T&gt;, the <strong>map(...).subscribe(...)</strong> is getting called / executed as expected. I might be missing something simple, let me know what it could be?</p>
  
  <p>Thank you </p>
  
  <p>`</p>
  
  <pre><code>public class Application {
      public static void main(String[] args) {      
          // Note: Working; get the list of databases
          DatabaseFlowable databases = new DatabaseFlowable(sourceClient);
          // Note: Working; for each database get the list of collections in it
          Flowable&lt;Resource&gt; resources = databases
              .flatMap(db -&gt; {
                  logger.info(" ==&gt; found database {}", db.getString("name"));
                  return new CollectionFlowable(sourceClient, db.getString("name"));
                  // Note: Working; CollectionFlowable::subscribeActual works as well
              });
          resources
              .map(resource -&gt; {
                  // Note: Nothing in here gets executed
                  logger.info(" ====&gt; found resource {}", resource.toString());
                  return resource;
              })
              .subscribe(m -&gt; {
                  // Note: Nothing in here gets executed
                  logger.info(m.toString());
              });
      }
  }
  
  
  
  public class DatabaseFlowable extends Flowable&lt;Document&gt; {
      private final static Logger logger = LoggerFactory.getLogger(DatabaseFlowable.class);
      private final MongoClient client;
  
      public DatabaseFlowable(MongoClient client) {
          this.client = client;
      }
  
      @Override
      protected void subscribeActual(Subscriber&lt;? super Document&gt; subscriber) {
          ListDatabasesIterable&lt;Document&gt; cursor = client.listDatabases();
          MongoCursor&lt;Document&gt; iterator = cursor.iterator();
  
          while(iterator.hasNext()) {
              Document item = iterator.next();
              if (!item.isEmpty()) {
                      String message = String.format(" found database name: %s, sizeOnDisk: %s",
                              item.getString("name"), item.get("sizeOnDisk"));
                      logger.info(message);
                      subscriber.onNext(item);
              }
          }
          subscriber.onComplete();
      }
  }
  
  public class CollectionFlowable extends Flowable&lt;Resource&gt; {
  
      private final static Logger logger = LoggerFactory.getLogger(CollectionFlowable.class);
      private final MongoClient client;
      private final String databaseName;
  
      public CollectionFlowable(MongoClient client, String databaseName) {
          this.databaseName = databaseName;
          this.client = client;
      }
  
  
      @Override
      protected void subscribeActual(Subscriber&lt;? super Resource&gt; subscriber) {
          MongoDatabase database = client.getDatabase(databaseName);
  
          ListCollectionsIterable&lt;Document&gt; cursor = database.listCollections();
          MongoCursor&lt;Document&gt; iterator = cursor.iterator();
  
          while(iterator.hasNext()) {
              Document item = iterator.next();
              if (!item.isEmpty()) {
                  logger.info(" ... found collection: {}.{}", database.getName(), item.getString("name"));
                  Resource resource = new Resource(databaseName,
                          item.getString("name"),
                          (Document) item.get("options"));
                  subscriber.onNext(resource);
              }
          }
          subscriber.onComplete();
      }
  }
  </code></pre>
  
  <p>`</p>