Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
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