title: Are calls to subscribe's consumer argument sequential in Project Reactor?
body: <p>With the following code:</p>
  
  <pre><code>flux.subscribe(consumer)
  </code></pre>
  
  <p>the calls to <code>consumer</code> may take place on different threads, depending on how <code>flux</code> was constructed (e.g., with the use of <code>subscribeOn</code> or <code>publishOn</code>).  Is there a guarantee that, even though calls to <code>consumer</code> may take place on different threads, the calls are sequential, i.e., each call completes before the next one starts?</p>
  
  <p>A more specific example below (using Reactor-Kafka):</p>
  
  <pre><code>val resultFlux: Flux&lt;Pair&lt;TopicPartition, Long&gt;&gt; = KafkaReceiver
      .create&lt;K, V&gt;(receiverOptions)
      .receive()
      .groupBy { m -&gt; m.receiverOffset().topicPartition() }
      .flatMap { partitionFlux -&gt;
          val parallelRoFlux = partitionFlux
                  .publishOn(scheduler)
                  .flatMapSequential(::processRecord, parallelism)
          parallelRoFlux.map { ro -&gt;
              acknowledge(ro)
              Pair(ro.topicPartition(), ro.offset())
          }
      }
  
  resultFlux.doOnNext { Thread.sleep(2000); log.info("doOnNext: $it") }
          .subscribe { Thread.sleep(1000); log.info("subscribe: $it") }
  </code></pre>
  
  <p>produces the following output snippet:</p>
  
  <pre><code>13:44:26.401 [elastic-6] INFO  consumerSvcFlow - Message_5&gt;&gt;&gt;processed
  13:44:28.402 [elastic-6] INFO  consumerExecutable - doOnNext: (demo-topic-0, 15)
  13:44:29.402 [elastic-6] INFO  consumerExecutable - subscribe: (demo-topic-0, 15)
  13:44:29.435 [elastic-8] INFO  consumerSvcFlow - Message_8&gt;&gt;&gt;processed
  13:44:31.435 [elastic-8] INFO  consumerExecutable - doOnNext: (demo-topic-0, 16)
  13:44:32.436 [elastic-8] INFO  consumerExecutable - subscribe: (demo-topic-0, 16)
  13:44:32.461 [elastic-6] INFO  consumerSvcFlow - Message_9&gt;&gt;&gt;processed
  13:44:34.462 [elastic-6] INFO  consumerExecutable - doOnNext: (demo-topic-0, 17)
  13:44:35.462 [elastic-6] INFO  consumerExecutable - subscribe: (demo-topic-0, 17)
  13:44:35.494 [elastic-8] INFO  consumerSvcFlow - Message_15&gt;&gt;&gt;processed
  13:44:37.494 [elastic-8] INFO  consumerExecutable - doOnNext: (demo-topic-0, 18)
  13:44:38.495 [elastic-8] INFO  consumerExecutable - subscribe: (demo-topic-0, 18)
  13:44:38.497 [elastic-6] INFO  consumerSvcFlow - Message_18&gt;&gt;&gt;processed
  13:44:40.498 [elastic-6] INFO  consumerExecutable - doOnNext: (demo-topic-0, 19)
  13:44:41.499 [elastic-6] INFO  consumerExecutable - subscribe: (demo-topic-0, 19)
  13:44:41.539 [elastic-8] INFO  consumerSvcFlow - Message_19&gt;&gt;&gt;processed
  13:44:43.540 [elastic-8] INFO  consumerExecutable - doOnNext: (demo-topic-0, 20)
  13:44:44.540 [elastic-8] INFO  consumerExecutable - subscribe: (demo-topic-0, 20)
  </code></pre>
  
  <p>The calls to the <code>subscribe</code> consumer argument are sequential but some calls are on thread [elastic-6] and some are on thread [elastic-8].</p>