question: public void sendMessages ( List < ProducerRecord < String , String > > records ) { Producer < String , String > producer = new KafkaProducer < > ( getProducerConfig ( ) ) ; for ( ProducerRecord < String , String > rec : records ) producer . send ( rec ) ; producer . flush ( ) ; producer . close ( ) ; }
target:  Sends a message to Kafka broker.