Consumer not receiving messages, kafka console, new consumer api, Kafka 0.9

后端 未结 16 1998
一个人的身影
一个人的身影 2021-02-01 02:41

I am doing the Kafka Quickstart for Kafka 0.9.0.0.

I have zookeeper listening at localhost:2181 because I ran

bin/zookeeper-server-start.sh          


        
16条回答
  •  梦毁少年i
    2021-02-01 03:02

    Your localhost is the foo here. if you replace the localhost word for the actual hostname, it should work.

    like this:

    producer

    ./bin/kafka-console-producer.sh --broker-list \
    sandbox-hdp.hortonworks.com:9092 --topic test
    

    consumer:

    ./bin/kafka-console-consumer.sh --topic test --from-beginning \    
    --bootstrap-server bin/kafka-console-consumer.sh --new-consumer \
    --topic test --from-beginning \
    --bootstrap-server localhost:9092
    

提交回复
热议问题