title: Difference between Mono#then and Mono#and?
body: <p>Given the following monos:</p>
  <pre class="lang-java prettyprint-override"><code>Mono&lt;Void&gt; mono1 = Mono.fromRunnable(() -&gt; {
      System.out.println(&quot;sleep1&quot;);
      try {
          Thread.sleep(1000);
      } catch (InterruptedException e) {
          throw new IllegalStateException(e);
      }
      System.out.println(&quot;mono1&quot;);
  });
  Mono&lt;Void&gt; mono2 = Mono.fromRunnable(() -&gt; {
      System.out.println(&quot;mono2&quot;);
  });
  Mono&lt;Void&gt; mono3 = Mono.fromRunnable(() -&gt; {
      System.out.println(&quot;mono3&quot;);
  });
  </code></pre>
  <p>Both:</p>
  <pre class="lang-java prettyprint-override"><code>mono1
          .then(mono2)
          .then(mono3)
          .block();
  </code></pre>
  <p>And:</p>
  <pre class="lang-java prettyprint-override"><code>mono1
          .and(mono2)
          .and(mono3)
          .block();
  </code></pre>
  <p>Have the same output:</p>
  <pre class="lang-none prettyprint-override"><code>sleep
  mono1
  mono2
  mono3
  </code></pre>
  <p>What's the difference between <a href="https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#then-reactor.core.publisher.Mono-" rel="nofollow noreferrer"><code>Mono#then</code></a> and <a href="https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html#and-org.reactivestreams.Publisher-" rel="nofollow noreferrer"><code>Mono#and</code></a> in this case?</p>
  <hr />
  <p>From <a href="https://projectreactor.io/docs/core/release/reference/index.html#which-operator" rel="nofollow noreferrer">https://projectreactor.io/docs/core/release/reference/index.html#which-operator</a>:</p>
  <blockquote>
  <p>[If you] have a sequence but [you are] not interested in values and [you] want to switch to another Mono at the end, [use] <code>Mono#then(mono)</code>.</p>
  <p>[If you] want to combine publishers by coordinating their termination from 1 Mono and any source into a Mono, [use] <code>Mono#and</code>.</p>
  </blockquote>
  <p>This doesn't help me finding a case where <code>#and</code> and <code>#then</code> would behave differently unfortunately.</p>