首页 > 代码库 > How to set an Apache Kafka multi node – multi broker cluster【z】
How to set an Apache Kafka multi node – multi broker cluster【z】
Set a multi node Apache ZooKeeper cluster
- On every node of the cluster add the following lines to the file kafka/config/zookeeper.properties
server.1=zNode01:2888:3888server.2=zNode02:2888:3888server.3=zNode03:2888:3888#add here more servers if you wantinitLimit=5syncLimit=2
For more informations about the meaning of the parameters please read Running Replicated ZooKeeper.
- On every node of the cluster create a file called myid in the folder represented by the dataDir property (by default the folder is /tmp/zookeeper ). The myid file should only contains the id of the znode (‘1′ for zNode01, ‘2’ for ZNode02, etc… )
Set a multi broker Apache Kafka cluster
- On every node of the cluster modify modify the property zookeeper.connect from the file kafka/config/server.properties:
zookeeper.connect=zNode01:2181,zNode02:2181,zNode03:2181
- On every node of the cluster modify the property host.name from the file kafka/config/server.properties:
host.name=zNode0x
- On every node of the cluster modify the property broker.id from the file kafka/config/server.properties (every broker in the cluster should have a unique id)
How to set an Apache Kafka multi node – multi broker cluster【z】
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。