code: public void flush() {
          for (ProducerType type : ProducerType.ALL_TYPES) {
              KafkaProducer<String, byte[]> producer = getJavaProducer(type);
              if (producer != null) {
                  producer.flush();
              }
          }
      }
docs: Flushes any messages in producer queue.
  
  @since 1.3.1