From the course: Complete Guide to Apache Kafka for Beginners

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Topic replication

Topic replication

Hi, this is Stephane from Conduktor and in this lecture, we're going to learn about the Kafka topic, replication factor and what it implies for your consumers and your producers. So topics in Kafka. When you're doing stuff on your own machine, they can have a replication factor of one, but usually when you are in production, that means you're having a real Kafka cluster, you need to set a replication factor greater than 1, usually between 2 and 3 and most commonly at 3. So that way if a broker is down, that means the Kafka server is stopped for maintenance or for a technical issue, then another Kafka broker still has a copy of the data to serve and receive. So let's take an example to understand this better. We have topic A, it has 2 partitions and a replication factor of 2. So we have 3 Kafka brokers and we're going to place topic 0, partition 0 of topic A onto broker 101, partition 1 of topic A onto broker 102. So this is the initial. And then because we have a replication factor of…

Contents