title: Automatic rate adjustment in Reactor
body: <h1><strong>TL;DR;</strong></h1>
  <p>Is there a way to automatically adjust delay between elements in Project Reactor based on downstream health?</p>
  <h1><strong>More details</strong></h1>
  <p>I have an application that reads records from Kafka topic, sends an HTTP request for each one of them and writes the result to another Kafka topic. Reading and writing from/to Kafka is fast and easy, but the third party HTTP service is easily overwhelmed, so I use <code>delayElements()</code> with a value from a property file, which means that this value does not change during application runtime. Here's a code sample:</p>
  <pre><code>kafkaReceiver.receiveAutoAck()
              .concatMap(identity())
              .delayElements(ofMillis(delayElement))
              .flatMap(message -&gt; recordProcessingFunction.process(message.value()), messageRate)
              .onErrorContinue(handleError())
              .map(this::getSenderRecord)
              .flatMap(kafkaSender::send)
  </code></pre>
  <p>However, the third party service might perform differently overtime and I'd like to be able to adjust this delay accordingly. Let's say, if I see that over 5% of requests fail over 10 second period, I would increase the delay. If it gets lower than 5% for over 10 sec, then I would reduce the delay again.</p>
  <p>Is there an existing mechanism for that in Reactor? I can think of some creative solutions from my side, but was wondering if they (or someone else) already implemented that.</p>