A replication factor configures how many broker replicas Kafka maintains for each topic partition. Replication keeps records available if a broker fails: one broker leads, while follower brokers copy the leader’s log. section 2.9.1
Use the factor to match the deployment context:
- A factor of 3 provides one leader and two followers; caught-up followers become in-sync replicas (ISR) and can be elected leader if the current leader fails. section 2.9.1
- A local testing broker can use replication factor 1 because no additional broker is available or required for the exercise. section 2.5.1
- Followers that fall behind the configured lag limit are removed from the ISR list until they catch up. section 2.9.1
kafka-topics --create --topic first-topic\ --bootstrap-server localhost:9092\ #1 --replication-factor 1\ #2 --partitions 1 #3
The topic-creation command makes the setting explicit: replication factor 1 creates a single replica for the local broker, alongside one partition. section 2.5.1



