kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moiz Raja <moiz.r...@viptela.com>
Subject NotLeaderForPartitionException in 0.8.x
Date Thu, 06 Apr 2017 17:44:14 GMT
Hi All,

I understand that we get a NotLeaderForPartitionException when the client tries to publish
a message to a server which is not the Leader for a given partition. I also understand that
once leadership does change the client will learn that and start publishing messages to the
right server. I am however seeing that sometimes even after leadership has changed the client
continues to send messages to the wrong server resulting in it continuously getting the NotLeaderForPartitionException.


I am not sure how to reproduce this problem because we have only seen this sporadically in
certain production deployments. When we get into this situation one step which usually works
is to restart zookeeper, kafka and the client. Obviously this is not acceptable. Is there
a workaround that I could implement which would help to remediate this situation. For example
would re-creating the KafkaProducer help in this scenario?

Thanks,
-Moiz
Mime
View raw message