kafka集群mirrormak同步
kafka集群mirrormak同步
https://blog.csdn.net/gdutliuyun827/article/details/55263245
11
Zk部署参考前期文档
效果如下,
zookeeper.connect=192.168.19.154:2181,192.168.19.157:2181,192.168.19.160:2181
Kafka集群部署
创建主题:
[root@sinleka kafka_2.11-0.11.0.0]# ./bin/kafka-topics.sh --create --zookeeper 192.168.19.154:2181,192.168.19.157:2181,192.168.19.160:2181 --partitions 4 --replication-factor 3 --topic firstone
[root@sinleka kafka_2.11-0.11.0.0]# ./bin/kafka-topics.sh --list --zookeeper 192.168.19.154:2181,192.168.19.157:2181,192.168.19.160:2181
firstone
[root@sinleka kafka_2.11-0.11.0.0]# ./bin/kafka-topics.sh --zookeeper 192.168.19.154:2181,192.168.19.157:2181,192.168.19.160:2181 --describe topic firstone
生产者:
[root@www kafka_2.11-0.11.0.0]# ./bin/kafka-console-producer.sh --broker-list 192.168.19.154:9092 --topic firstone
消费者:
[root@sinleka kafka_2.11-0.11.0.0]# ./bin/kafka-console-consumer.sh --bootstrap-server 192.168.19.154:9092 --topic firstone --from-beginning
源集群
目标集群
11