kafka command

create

$KAFKA_HOME/bin/kafka-topics.sh 
--create 
--zookeeper host: port 
--replication-factor number  
--partitions number 
--topic topic_name

list

$KAFKA_HOME/bin/kafka-topics.sh
--list 
--zookeeper host:port

producer

$KAFKA_HOME/bin/kafka-console-producer.sh 
--broker-list host: brokerport 
--topic topic_name

consumer

$KAFKA_HOME/bin/kafka-console-consumer.sh
--bootstrap-server host:brokerport
--topic topic_name
--from-beginning

describe topic

$KAFKA_HOME/bin/kafka-topics.sh 
--describe
--zookeeper host:port
--topic topic_name

connect ???

$KAFKA_HOME/bin/connect-standalone.sh 
config/connect-standalone.properties 
config/connect-file-source.properties  
config/connect-file-sink.properties

你可能感兴趣的:(kafka command)