my problem is i have setup 2 kafka brokers and 2 zookeeper nodes on different docker containers(Ubuntu).
Here is my configuration file of server1.properties
broker.id=1
############################# Socket Server Settings
listeners=PLAINTEXT://0.0.0.0:9092
advertised.listeners=PLAINTEXT://ipaddress_server1:9092
zookeeper.properties configuration file -
dataDir=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=200
tickTime=2000
initLimit=20
syncLimit=10
this is are the properties for both the kafka and zookeeper servers. I have given unique broker id for each server and also create myid file insite /tmp/zookeeper dir.
now when i am testing kafka cluster by producing messages through only one ip address like this ./bin/kafka-console-producer.sh --broker-list 172.171.0.3:9092 --topic demo it works fine. But when i shutdown one container which is leader, still i am getting messages from the topic. But when i am running the consumer script again it is showing me WARN msgs : -
Connection to node -1 (/172.171.0.3:9092) could not be established. Broker may not be available
Now i am not able to get the messages, what should i do ???