Skip to content
Advertisement

kafka producer does not throw exception when broker is down

Created a cluster with two brokers using same zookeeper and trying to produce message to a topic whose details are as below.

kafka topic description

When the producer sets acks="all" or -1,min.insync.replicas="2", it is supposed to receive acknowledgement from the brokers(leaders and replicas) but when one broker is shut manually while it is producing, it is making no difference to the kafka producer even when acks=”all” can someone explain the reason for this weird behavior?

brokers are on 9091,9092.

JavaScript

Below is the source code for the kafka producer

JavaScript

Eclipse Console output of kafkacallback

Advertisement

Answer

ack=all means that it requires ack from all in-sync replicas, not from all replicas (refer to documentation)

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement