You can pipe it in:
kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic
--new-producer < my_file.txt
Found here.
From 0.9.0:
kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic < my_file.txt
You can pipe it in:
kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic
--new-producer < my_file.txt
Found here.
From 0.9.0:
kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic < my_file.txt