需要白名单/黑名单/主题之一

dsa*_*dsa 6 apache-kafka

我正在尝试启动 Kafka 消费者,但它显示以下错误:

$ bin/kafka-console-consumer.sh --zookeeper localhost:2181 —topic Hello-Kafka 
Exactly one of whitelist/blacklist/topic is required.
Option                                  Description                            
------                                  -----------                            
--blacklist <blacklist>                 Blacklist of topics to exclude from    
                                          consumption.                         
--bootstrap-server <server to connect                                          
  to>                                                                          
--consumer.config <config file>         Consumer config properties file.       
--csv-reporter-enabled                  If set, the CSV metrics reporter will  
                                          be enabled                           
--delete-consumer-offsets               If specified, the consumer path in     
                                          zookeeper is deleted when starting up

............
............
Run Code Online (Sandbox Code Playgroud)

小智 8

您可以使用如下:

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic Hello-Kafka