w1100n
This site is best viewed in Google Chrome
5/7/2018 12:16

download kafka
https://kafka.apache.org/downloads

config file:

The id of the broker. This must be set to a unique integer for each broker.

broker.id=0

最好配内网dns, test-kafka-1

listeners=PLAINTEXT://test-kafka-1:9092

log.dirs=/data/logs/kafka-logs
zookeeper.connect=test-zookeeper-1:2181,test-zookeeper-2:2181,test-zookeeper-3:2181

bin/kafka-topics.sh --create --zookeeper 172.0.0.1:2181 --replication-factor 3 --partitions 3 --topic t0

replication策略是基于partition。kafka通过创建topic时可以通过–replication-factor配置partition副本数。配置副本之后,每个partition都有一个唯一的leader,有0个或多个follower。

install kafka manager
https://blog.csdn.net/isea533/article/details/73727485

https://my.oschina.net/sniperLi/blog/741565
https://gist.github.com/vipmax/9ceeaa02932ba276fa810c923dbcbd4f
https://blog.csdn.net/cysdxy/article/details/52337364

Comments are closed.

<< Previous Posts Newer Posts >>
辽ICP备14012896