title: Is there a difference between doOnSuccess vs doOnNext for a Mono?
body: <p>Lets say you have <code>Mono&lt;Integer&gt; someIntegerSource = Mono.just(5)</code> and you want to assign it to a variable.</p>
  
  <p>Is there a difference between these code snippets?</p>
  
  <p>Case 1: doOnSuccess</p>
  
  <pre><code>someIntegerSource.doOnSuccess(number -&gt; this.myNumber = number)
  </code></pre>
  
  <p>Case2: doOnNext</p>
  
  <pre><code>someIntegerSource.doOnNext(number -&gt; this.myNumber = number)
  </code></pre>
  
  <p>Case 3: doOnSuccess + then (because i want to the assignment to be complete before emitting completion of the mono)</p>
  
  <pre><code>someIntegerSource.doOnSuccess(number -&gt; this.myNumber = number).then()
  </code></pre>