I have a simple Kafka Consumer in java with the following code
public void run() { ConsumerIterator it = m_stream.iterator(
The solution was to add the property
"consumer.timeout.ms"
Now when the timeout is reached a ConsumerTimeoutException is thrown