Note: after creating a KafkaProducer you must always close() it to avoid resource leaks.
went through the documentation but could not understand it. Can anyo