I am using the following code to help kafka stream listener threads to exit out of the blocking call of hasNext() on the consumerIterator. But the threads never exit, when they receive allDone() signal. I am not sure whether I am making any mistake. Please let me know is this right approach.
public void stop() throws InterruptedException { for (ConsumerIterator<byte[], byte[]> consumer : consumerIterators) { consumer.allDone(); } shutdown(); } Thanks & Regards,