Kafka provided a number of utility tools inside the distribution. The partition reassignment tool can be used to increase the replication factor of a topic. In this article, I am going to discuss about the way to increase topic replication factor using partition reassignment tool. The purpose of adding replication in Kafka is for stronger durability and higher availability. We want to guarantee that any successfully published message will not be lost and can be consumed, even when there are server failures.
Increasing the replication factor of an existing partition is easy. We need to create a custom reassignment json file and use it with the –execute option to increase the replication factor of the specified partitions.