Kafka producer to read data files

前端 未结 7 593
傲寒
傲寒 2021-02-02 04:14

I am trying to load a data file in loop(to check stats) instead of standard input in Kafka. After downloading Kafka, I performed the following steps:

Started zookeeper:<

7条回答
  •  再見小時候
    2021-02-02 04:45

    The easiest way if you are using Linux or Mac is:

    kafka-console-producer --broker-list localhost:9092 --topic test < messages.txt
    

    Reference: https://github.com/Landoop/kafka-cheat-sheet

提交回复
热议问题