I've implemented a Kafka highlevel consumer from group : 'org.apache.kafka' ,name :'kafka_2.10' ,version : '0.9.0.1' in Java.
I noticed that consumerIterator is thread blocking. It's hasNext() won't return until a new msg comes to consume. I use consumer.timeout.ms for overcome this. But sometimes I need whenever user call off, the consumer should shutdown. Since the thread is in busy waiting in consumerIterator, I won't be able to shutdown.
Is there a way to overcome thread block in Kafka consumer? Can I change the kafka properties value dynamically?