title: Producer app crashes when Kafka cluster is offline
body: <p>Kafka brokers were restarted and as a result producer application crashed. Messages are being sent to kafka in an async fashion which means if the kafka broker is offline, the producer app should not have any effect since there will be no blocking threads. I wanted to understand why the producer app crashed. Any suggestions?</p>
  
  <pre class="lang-java prettyprint-override"><code>public void pushMessage(P partitionKey, M message, Consumer&lt;Exception&gt; exceptionHandler) {
     executorService.submit(() -&gt; {
        // this.producer -&gt; KafkaProducer&lt;P, M&gt; from the kafka lib
         producer.send(record, (metadata, exception) -&gt; {
             if (exception != null &amp;&amp; exceptionHandler != null) {
                 exceptionHandler.accept(exception);
             }
         });
     });
  }
  </code></pre>