title: How to wrap a Flux with a blocking operation in the subscribe?
body: <p>In the documentation it is written that you should wrap blocking code into a <code>Mono</code>: <a href="http://projectreactor.io/docs/core/release/reference/#faq.wrap-blocking" rel="nofollow noreferrer">http://projectreactor.io/docs/core/release/reference/#faq.wrap-blocking</a></p>
  
  <p>But it is not written how to actually do it.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>@PostMapping(path = "some-path", consumes = MediaType.APPLICATION_STREAM_JSON_VALUE)
  public Mono&lt;Void&gt; doeSomething(@Valid @RequestBody Flux&lt;Something&gt; something) {
      something.subscribe(something -&gt; {
          // some blocking operation
      });
  
      // how to return Mono&lt;Void&gt; here?
  }
  </code></pre>
  
  <p>The first problem I have here is that I need to return something but I cant.
  If I would return a <code>Mono.empty</code> for example the request would be closed before the work of the flux is done.</p>
  
  <p>The second problem is: how do I actually wrap the blocking code like it is suggested in the documentation:</p>
  
  <pre><code>Mono blockingWrapper = Mono.fromCallable(() -&gt; { 
      return /* make a remote synchronous call */ 
  });
  blockingWrapper = blockingWrapper.subscribeOn(Schedulers.elastic()); 
  </code></pre>