How to check whether Kafka Server is running?

后端 未结 9 1560
无人及你
无人及你 2020-12-08 03:46

I want to ensure whether kafka server is running or not before starting production and consumption jobs. It is in windows environment and here\'s my kafka server\'s code in

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 04:42

    You can install Kafkacat tool on your machine

    For example on Ubuntu You can install it using

    apt-get install kafkacat
    

    once kafkacat is installed then you can use following command to connect it

    kafkacat -b : -t test-topic
    
    • Replace with your machine ip
    • can be replaced by the port on which kafka is running. Normally it is 9092

    once you run the above command and if kafkacat is able to make the connection then it means that kafka is up and running

提交回复
热议问题