title: flatMap() vs subscribe() in Spring webflux
body: <p>I am a newbie to Spring WebFlux and trying to convert my spring MVC application to webflux. I return a Mono mono from my service : </p>
  
  <pre><code>    List&lt;Store&gt; stores = new ArrayList();
  </code></pre>
  
  <p>When I do:</p>
  
  <pre><code>    mono.subscribe(stores::addAll);
      dataexchange.put("stores", stores);
      return Mono.just(dataexchange);
  </code></pre>
  
  <p>Then stores is populated as empty list in response. However, I can verify that subscribe() is working after returning response.</p>
  
  <p>When I do :</p>
  
  <pre><code>    return mono.flatmap( (response) -&gt; {
          dataexchange.put("stores", response));
          return Mono.just(dataexchange);
      });
  </code></pre>
  
  <p>Then stores is populated in the response.</p>
  
  <p>Can someone please explain me what is the difference between the two? Is flatMap blocking?
  Thanks in advance !</p>