Kafka Consumer hanging at .hasNext in java

后端 未结 2 846
粉色の甜心
粉色の甜心 2021-01-04 21:20

I have a simple Kafka Consumer in java with the following code

    public void run() {
        ConsumerIterator it = m_stream.iterator(         


        
2条回答
  •  失恋的感觉
    2021-01-04 21:57

    The solution was to add the property

    "consumer.timeout.ms"

    Now when the timeout is reached a ConsumerTimeoutException is thrown

提交回复
热议问题