code: public <K, V> void produce(String topic, KafkaProducer<K, V> producer, Map<K, V> data) {
          data.forEach((k, v) -> producer.send(new ProducerRecord<>(topic, k, v)));
          producer.flush();
      }
docs: Produce data to the specified topic
  
  @param topic    Topic to produce to
  @param producer Producer to use
  @param data     Data to produce
  @param <K>      Type of key
  @param <V>      Type of value