Affects Version/s: 0.8.0
Fix Version/s: 0.8.0
Environment:Ubuntu Linux x64
Running an application that uses the Kafka client under load, can often hit this issue within a few hours.
High-level consumers come and go over this application's lifecycle, but there are a variety of defenses that ensure each high-level consumer lasts several seconds before being shutdown. Nevertheless, some race is causing this background thread to continue long after the ZKClient it is using has been disconnected. Since the thread was spawned by a consumer that has already been shutdown, the application has no way to find this thread and stop it.
Reported on the users-kafka mailing list 6/25 as "0.8 throwing exception 'Failed to find leader' and high-level consumer fails to make progress".
The only remedy is to shutdown the application and restart it. Externally detecting that this state has occurred is not pleasant: need to grep log for repeated occurrences of the same exception.
Failed to find leader for Set([topic6,0]): java.lang.NullPointerException