Created 05-05-2016 07:07 AM
If I use below command to get data from my_file.txt, it captures all the data and I can get it at consumer console. If my_file.txt is continuosly updating then how can I keep my producer running and keep producing latest data?
kafka-console-producer.sh --broker-list localhost:9092 --topic my_topic < my_file.txt
Created 05-05-2016 07:07 AM
did you try tail -f file | kafka-console-producer.sh --broker-list localhost:9092--topic my_topic
Created 05-05-2016 07:07 AM
did you try tail -f file | kafka-console-producer.sh --broker-list localhost:9092--topic my_topic
Created 05-06-2016 06:00 AM
@Rajkumar Singh - Thank you! It works.
Created 05-05-2016 07:31 AM
I would also use NiFi's TailFile processor and PutKafka to achieve what you're doing.
Created 05-06-2016 06:01 AM
Thank you @Artem Ervits