Kafka生产与消费脚本工具

创建主题

[root@localhost bin]# ./kafka-topics.sh --bootstrap-server 192.168.10.141:9092,192.168.10.142:9092,192.168.10.143:9092 --create --topic topic-demo --replication-factor 3 --partitions 4
Created topic topic-demo.

展示主题信息

[root@localhost bin]# ./kafka-topics.sh --bootstrap-server 192.168.10.141:9092,192.168.10.142:9092,192.168.10.143:9092  --describe --topic topic-demo
Topic: topic-demo	TopicId: ozDa0U7bQVWlWOdOIYBeuQ	PartitionCount: 4	ReplicationFactor: 3	Configs: 
	Topic: topic-demo	Partition: 0	Leader: 3	Replicas: 3,1,2	Isr: 3,1,2
	Topic: topic-demo	Partition: 1	Leader: 1	Replicas: 1,2,3	Isr: 1,2,3
	Topic: topic-demo	Partition: 2	Leader: 2	Replicas: 2,3,1	Isr: 2,3,1
	Topic: to

你可能感兴趣的:(Kafka从入门到精通,kafka,zookeeper,分布式)