Skip to content

Instantly share code, notes, and snippets.

View haroon9's full-sized avatar
🏠
Working from home

Haroon Gul haroon9

🏠
Working from home
View GitHub Profile
@haroon9
haroon9 / 01_IncreaseReplicationFactor.md
Created November 21, 2024 10:32 — forked from uarun/01_IncreaseReplicationFactor.md
Increase replication factor for __consumer_offsets Kafka topic

Increasing replication factor for a topic

  1. Create a custom reassignment plan (see attached file inc-replication-factor.json). In this case we are going from replication factor of 1 to 3.

  2. Run Kafka partition reassignment script:

    kafka-reassign-partitions --zookeeper $ZOOKEEPER_CONNECT \
        --reassignment-json-file /home/liquidnt/inc-replication-factor.json  \
        --execute
    
  3. Verify if the assignment was successful