Handling Fault Tolerance
Fault Tolerance and Robustness in Kafka.
Make sure that 3 instances of brokers are running along with the zookeeper and server.
Apr 12, 2021
- Run the Kafka producer
.\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test-topic-replicated
2. Run the Kafka Consumer.
.\bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test-topic-replicated
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.