Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exactly one of whitelist/blacklist/topic is required

Tags:

apache-kafka

I am trying to start Kafka consumer but it is showing below error:

$ 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

............
............
like image 662
dsa Avatar asked Mar 15 '17 07:03

dsa


1 Answers

You can use as below:

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

like image 77
Luan Nguyen Avatar answered Nov 15 '22 11:11

Luan Nguyen