返回到文章

采纳

编辑于

前提:(kafka集群3个broker,topic 8个分区 3个副本).问题(杀掉broker0之后,就无法消费,可以produce)

kafka

MacBook-Pro:kafka_2.11-1.0.0 pan$ bin/kafka-topics.sh --describe --zookeeper localhost:2182 --topic my-replicated-topic
Topic:my-replicated-topic   PartitionCount:8    ReplicationFactor:3 Configs:
      Topic: my-replicated-topic    Partition: 0    Leader: 1   Replicas: 1,2,0 Isr: 1,2
      Topic: my-replicated-topic    Partition: 1    Leader: 2   Replicas: 2,0,1 Isr: 2,1
      Topic: my-replicated-topic    Partition: 2    Leader: 1   Replicas: 0,1,2 Isr: 1,2
      Topic: my-replicated-topic    Partition: 3    Leader: 1   Replicas: 1,0,2 Isr: 1,2
      Topic: my-replicated-topic    Partition: 4    Leader: 2   Replicas: 2,1,0 Isr: 2,1
      Topic: my-replicated-topic    Partition: 5    Leader: 2   Replicas: 0,2,1 Isr: 2,1
      Topic: my-replicated-topic    Partition: 6    Leader: 1   Replicas: 1,2,0 Isr: 1,2
      Topic: my-replicated-topic    Partition: 7    Leader: 2   Replicas: 2,0,1 Isr: 2,1

brokder0 已经被杀掉,但是无法消费,启动broker0又可以恢复消费。生产消息不受影响。咋回事呢?