建立测试是topic
-bash-4.1#bin/kafka-topics.sh -create --topic test1 --zookeeper router1:2181/kakfa--partitions 3 --replication-factor 2 Created topic"topic1". -bash-4.1#bin/kafka-topics.sh -describe --topic test1 --zookeeper router1:2181/kafka Topic:topic1 PartitionCount:3 ReplicationFactor:2 Configs: Topic: topic1 Partition: 0 Leader: 1 Replicas: 1,2 Isr: 1,2 Topic: topic1 Partition: 1 Leader: 2 Replicas: 2,3 Isr: 2,3 Topic: topic1 Partition: 2 Leader: 3 Replicas: 3,1 Isr: 3,1发送测试消息
消费测试消息
至此Kafka集群搭建完成!
Ubuntu 14.04安装分布式存储Sheepdog+ZooKeeper