Details
Description
Currently the heartbeat thread's lookupCoordinator() is called in a tight loop if brokers crash and the consumer is left running. Besides that it floods the logs on debug level, it increases CPU usage as well.
The fix is easy, just need to put a backoff call after coordinator lookup.
Reproduction:
- Start a few brokers
- Create a topic and produce to it
- Start consuming
- Stop all brokers
At this point lookupCoordinator() will be called in a tight loop.