Kafka reassignment of __consumer_offsets incorrect?

后端 未结 2 761
执笔经年
执笔经年 2021-01-22 10:07

I am confused with how kafka-reassignment-paritions works for __consumer_offsets topic?

I start with 1 zk and 1 kafka broker, create a test topic with replication=1, par

2条回答
  •  北海茫月
    2021-01-22 10:26

    You can use the reassignment tool to generate json for your own advantage. In your topics-to-move.json, instead of putting partition values, put {"version":1, "topics":[{"topic":"__consumer_offsets"}]}

    Now when you run kafka-reassign-partitions --zookeeper zookeeper1:2181 --topics-to-move-json-file topics-to-move.json --broker-list "101,102" --generate You will get recommended partition assignment from tool.

    Save that file as reassignment-proposed.json and store old assignment into rollback.json.

    Use that file to start reassignment /kafka-reassign-partitions.sh --zookeeper localhost:2181 --reassignment-json-file reassignment-proposed.json --execute Verify assignment using --verify option

提交回复
热议问题