Latest extension in KafkaConsumer with reconnect/retry introduced race condition during shut down. Potentially this leaves threads running after shut down.
Retry flag is set to false only if consumer wakeup throws an exception during consumer poll.
Interrupted Exception leaves the while loop only if thread is currently sleeping.
If the thread executes any thing else during shut down, the thread will continuously loop.
I will prepare a proposal patch set soon.