0
votes

I have tried to input data into Kafka connect-test topic using below steps.I was able to consume topic once and on second attempt with new file,I am unable to get data consumed . Output file test.sink.txt is not getting updated

Step1 : echo -e "foo\nbar" > test.txt

Step2 : bin/connect-standalone.sh config/connect-standalone.properties config/connect-file-source.properties config/connect-file-sink.properties

Step3 : bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic connect-test --from-beginning

-rw-rw-r-- 1 kafka kafka 8 Jan 27 20:41 test.txt -rw-rw-r-- 1 kafka kafka 0 Jan 27 20:42 test.sink.txt

1

1 Answers

0
votes

Similar issue is answered here : Kafka connect tutorial stopped working

The Kafka file source connect keeps the last read location from file. When you deleted the file without resetting the offsets to 0, connector waits for new data to show starting at a specific character count from the beginning.

If you are using stand alone mode deleting /tmp/connect.offsets will solve the issue.