title: Spring Reactor Merge vs Concat
body: <p>I´m playing with Spring reactor, and I cannot see any differences between <code>concat</code> and <code>merge</code> operator</p>
  
  <p>Here's my example</p>
  
  <pre><code>    @Test
      public void merge() {
          Flux&lt;String&gt; flux1 = Flux.just("hello").doOnNext(value -&gt; {
              try {
                  Thread.sleep(1000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          });
          Flux&lt;String&gt; flux2 = Flux.just("reactive").doOnNext(value -&gt; {
              try {
                  Thread.sleep(2000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          });
          Flux&lt;String&gt; flux3 = Flux.just("world");
          Flux.merge(flux1, flux2, flux3)
                  .map(String::toUpperCase)
                  .subscribe(System.out::println);
      }
  
      @Test
      public void concat() {
          Flux&lt;String&gt; flux1 = Flux.just("hello").doOnNext(value -&gt; {
              try {
                  Thread.sleep(1000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          });
          Flux&lt;String&gt; flux2 = Flux.just("reactive").doOnNext(value -&gt; {
              try {
                  Thread.sleep(2000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          });
          Flux&lt;String&gt; flux3 = Flux.just("world");
          Flux.concat(flux1, flux2, flux3)
                  .map(String::toUpperCase)
                  .subscribe(System.out::println);    
  }
  </code></pre>
  
  <p>Both behave exactly the same. Can someone explain the difference between the two operations? </p>