kafka.consumer.SimpleConsumer:由于套接字错误而重新连接:java.nio.channels.ClosedChannelException [英] kafka.consumer.SimpleConsumer: Reconnect due to socket error: java.nio.channels.ClosedChannelException
本文介绍了kafka.consumer.SimpleConsumer:由于套接字错误而重新连接:java.nio.channels.ClosedChannelException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为kafka运行一个简单的消费者,例如:
I am running a simple consumer for kafka such as this:
int timeout = 80000;
int bufferSize = 64*1024;
consumer = new SimpleConsumer(host, port,timeout, bufferSize, clientName);
这可以运行几个小时,但我在$ b后得到一个例外
$ b kafka.consumer.SimpleConsumer:由于套接字错误而重新连接:
This runs fine for a couple of hours but I get an exception later on kafka.consumer.SimpleConsumer: Reconnect due to socket error:
java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelException
和消费者停止......以前有人遇到过这个问题吗?
and consumer stops ... has anyone faced this problem before ?
推荐答案
我也遇到了类似的问题,只是升级到最新版本的kafka为我修复了它。
I too faced a similar issue just upgrading to the newest version of kafka fixed it for me.
这篇关于kafka.consumer.SimpleConsumer:由于套接字错误而重新连接:java.nio.channels.ClosedChannelException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文