使用命令:
./connect-standalone.sh ../config/connect-standalone.properties ../config/connect-file-source.properties ../config/connect-file-sink.properties 启动之后,
一直刷:
[2018-09-25 11:30:20,523] INFO [Consumer clientId=consumer-1, groupId=connect-local-file-sink] (Re-)joining group (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:509)
[2018-09-25 11:30:20,553] INFO [Consumer clientId=consumer-1, groupId=connect-local-file-sink] Successfully joined group with generation 1 (org.apache.kafka.clients.consumer.internals.AbstractCoordinator:473)
[2018-09-25 11:30:20,554] INFO [Consumer clientId=consumer-1, groupId=connect-local-file-sink] Setting newly assigned partitions [testconnec-0] (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator:280)
[2018-09-25 11:30:20,572] INFO [Consumer clientId=consumer-1, groupId=connect-local-file-sink] Resetting offset for partition testconnec-0 to offset 0. (org.apache.kafka.clients.consumer.internals.Fetcher:583)
[2018-09-25 11:30:30,261] INFO WorkerSourceTask{id=local-file-source-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:397)
[2018-09-25 11:30:30,262] INFO WorkerSourceTask{id=local-file-source-0} flushing 0 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:414)
[2018-09-25 11:30:40,264] INFO WorkerSourceTask{id=local-file-source-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:397)
[2018-09-25 11:30:40,267] INFO WorkerSourceTask{id=local-file-source-0} flushing 0 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:414)
[2018-09-25 11:30:50,268] INFO WorkerSourceTask{id=local-file-source-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:397)
[2018-09-25 11:30:50,268] INFO WorkerSourceTask{id=local-file-source-0} flushing 0 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:414)
[2018-09-25 11:31:00,271] INFO WorkerSourceTask{id=local-file-source-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:397)
[2018-09-25 11:31:00,273] INFO WorkerSourceTask{id=local-file-source-0} flushing 0 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:414)
在添加改变时也没有改变
root@localhost data]# echo "sfv,bvhgccv" >> test.txt
[root@localhost data]# echo "sllllllcv" >> test.txt。
无法写入test.sink.txt 中
[root@localhost data]# cat test.sink.txt
消费消息中也不能显示:
[root@localhost bin]# ./kafka-console-consumer.sh --bootstrap-server 192.168.16.143:19092 --topic testconnec --from-beginning
^CProcessed a total of 0 messages