返回到文章

采纳

编辑于

kafka broker数据丢失问题

kafka

broker与zk失去连接,leader切换,这期间的几秒内会发生部分数据丢失,我的replica配置是2,ack是all,从kafka的机制上来说会有这种数据丢失的问题么?怎么可以解决?

[2016-12-19 16:02:50,086] INFO re-registering broker info in ZK for broker 0 (kafka.server.KafkaHealthcheck$SessionExpireListener)
[2016-12-19 16:02:50,088] INFO Creating /brokers/ids/0 (is it secure? false) (kafka.utils.ZKCheckedEphemeral)
[2016-12-19 16:02:50,089] INFO Result of znode creation is: OK (kafka.utils.ZKCheckedEphemeral)
[2016-12-19 16:02:50,090] INFO Registered broker 0 at path /brokers/ids/0 with addresses: PLAINTEXT -> EndPoint(100.77.2.66,9092,PLAINTEXT) (kafka.utils.ZkUtils)
[2016-12-19 16:02:50,090] INFO done re-registering broker (kafka.server.KafkaHealthcheck$SessionExpireListener)
[2016-12-19 16:02:50,090] INFO Subscribing to /brokers/topics path to watch for new topics (kafka.server.KafkaHealthcheck$SessionExpireListener)
[2016-12-19 16:02:50,091] INFO New leader is 7 (kafka.server.ZookeeperLeaderElector$LeaderChangeListener)