public <K,V>void produce(String producerName,int messageCount,Serializer<K> keySerializer,Serializer<V> valueSerializer,Runnable completionCallback,Supplier<ProducerRecord<K,V>> messageSupplier){
  Properties props=getProducerProperties(producerName);
  Thread t=new Thread(null);
  t.setName(producerName + "-thread");
  t.start();
}

public < K , V > void produce ( String producerName , int messageCount , Serializer < K > keySerializer , Serializer < V > valueSerializer , Runnable completionCallback , Supplier < ProducerRecord < K , V > > messageSupplier ) { Properties props = getProducerProperties ( producerName ) ; Thread t = new Thread ( null ) ; t . setName ( producerName + "-thread" ) ; t . start ( ) ; }
use the supplied function to asynchronously produce messages and write them to the cluster .
