Kafka集群数据同步MirrorMaker

修改配置文件
vim $KAFKA_HOME/config/consumer.properties 添加修改

bootstrap.servers=HK70:9092,HK69:9092,HK68:9092
group.id=hk-consumer-group
auto.offset.reset=earliest
##下面SASL加密(如不需要忽略)
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
username="test" \
password="test123";
security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN

vim $KAFKA_HOME/config/producer.properties添加修改

bootstrap.servers=kafka74:9092,kafka75:9092,kafka76:9092
compression.type=none
retries=3

启动MirrorMaker

cd $KAFKA_HOME;
bin/kafka-mirror-maker.sh --consumer.config config/consumer.properties --producer.config config/producer.properties --num.streams --whitelist 'applog|ota.*' &

–whitelist为要同步的topic正则表达式.
kafka集群同步,从香港kafka集群服务器SASL加密,到国内kafka服务器不需要加密.
———————
作者:小白鸽
来源:CSDN
原文:https://blog.csdn.net/baifanwudi/article/details/78269923
版权声明:本文为博主原创文章,转载请附上博文链接!

Leave a Reply

Your email address will not be published. Required fields are marked *