kafka 副本和分区改怎么设置,4个kafka结点,topic有4个副本

天南地北 发表于: 2019-03-12   最后更新时间: 2019-03-12  

这两种那种比较合理,我是倾向于第一种

{
    "version": 1,
    "partitions": [{
        "topic": "deploycontrol",
        "partition": 3,
        "replicas": [0, 1, 2]
    }, {
        "topic": "deploycontrol",
        "partition": 2,
        "replicas": [1, 3, 4]
    }, {
        "topic": "deploycontrol",
        "partition": 0,
        "replicas": [1, 2, 3]
    }, {
        "topic": "deploycontrol",
        "partition": 1,
        "replicas": [0, 2, 3]
    }]
}
{
    "version": 1,
    "partitions": [{
        "topic": "deploycontrol",
        "partition": 3,
        "replicas": [3, 4, 1]
    }, {
        "topic": "deploycontrol",
        "partition": 2,
        "replicas": [2, 3, 4]
    }, {
        "topic": "deploycontrol",
        "partition": 0,
        "replicas": [4, 1, 2]
    }, {
        "topic": "deploycontrol",
        "partition": 1,
        "replicas": [1, 2, 3]
    }]
}


您需要解锁本帖隐藏内容请: 点击这里
本帖隐藏的内容





发表于: 5月前   最后更新时间: 5月前   游览量:932
上一条: Kafka消费时报错org.springframework.kafka.KafkaException: No method found for class java.lang.String
下一条: 生产者无法发送消息,ERROR Error when sending message to topic adon with key: null, value: 0 bytes?

  • 写错了,是三个副本

    • 重新分贝分区 时提示 ERROR:Assigned replicas (2,3,1)don't match the list of replicas for reassignment (4,1,2),
      reassignment of partition [topic ,0] faild 这个有什么后果,会不会出大事