How to make full replication in kafka?

前端 未结 2 1103
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-28 08:05

How to make full replication in kafka?

I have two servers, a leader and a follower.

How to make sure that when the leader refuses (turns off), all messages that

2条回答
  •  醉话见心
    2021-01-28 08:53

    How to make sure that when the leader refuses (turns off), all messages that are sent to the follower also appear on the leader after turning it on

    This is built into the protocol, but that assumes every topic you are using has replication-factor=2


    Sounds like you have only two brokers on the same network, so you do not need MirrorMaker, as the docs show it clearly is between two different, regional datacenters.

    I would like to add, if you did want to do that, don't use kafka-mirror-maker. It is not as fault-tolerant and scalable as you might expect.

    Instead, use MirrorMaker 2, as part of the apache-kafka-connect framework.

提交回复
热议问题