Handling Fault Tolerance

Fault Tolerance and Robustness in Kafka.

Make sure that 3 instances of brokers are running along with the zookeeper and server.

Sagar Kudu

--

  1. Run the Kafka producer
.\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test-topic-replicated
producing messages.

2. Run the Kafka Consumer.

.\bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test-topic-replicated 
consuming messages

Let's bring one of the brokers down.

→ now check on the consumer console you will see the warning.

Server down? but still, a consumer is receiving the messages.

  • But do not worry, even the server-2 is down, you are still able to send and receive the message and the client still doesn’t have an idea about it, right?

Summary: This is the fault-tolerant behavior. So Kafka takes error handling and in a client perspective view, you don’t have to worry much about it.

--

--

Sagar Kudu

I am Full Stack Java Developer @ Tata Strive | Get blogs and tutorials related to the (React | Kafka | DevOps) | Connect https://www.linkedin.com/in/sagarkudu/