title: How to handle nested subscriptions in Spring webflux
body: <p>I have a requirement in which I need to perform a sequence of 3 method calls each of which returns a Mono.</p>
  <pre><code>   Mono&lt;WeightResponse&gt; weightService() 
     Mono&lt;PriceResponse&gt; priceService(WeightResponse wr) 
     Mono&lt;DispatchResponse&gt; dispatchService(PriceResponse pr)
  </code></pre>
  <p>These 3 method calls need to be done in chronological order.</p>
  <p>This is what I have tried to come up with. I am yet to compete and test this functionality end to end. I am looking for advice on how to handle this type of scenario in Spring Reactor?
  There is subscription inside subscription inside subscription. Is this the right approach to handle such a scenario?
  Could there be any side effects of such nested subscriptions?</p>
  <pre><code>weightService().subscribe(wr -&gt; {
        priceService(wr).subscribe (pr -&gt; {
          dispatchService(pr).subscribe (dr -&gt; {
              System.out.println(&quot;Dispatch Done!&quot;);
            },
            e -&gt; log.error(&quot;error in dispatch {}&quot;, e);
          );
         },
         e -&gt; log.error(&quot;error in pricing {}&quot;, e);
        );
       },
       e -&gt; log.error(&quot;error in weight calculation {}&quot;, e);
     );
        
  </code></pre>