kafka节点不断断开连接并重新连接“kafka producer error:nestederror refreshbrokenmetadata”

np8igboo  于 2021-06-04  发布在  Kafka
关注(0)|答案(0)|浏览(476)

nodejs服务器以pm2作为一个单示例fork启动。
我的Kafka选择:

export const kafkaTopics = ['chat'];
export const kafkaOptions: ConsumerGroupOptions = {
  kafkaHost,
  groupId: 'test-chat',
  batch: undefined,
  sessionTimeout: 15000,
  protocol: ['roundrobin'],
  encoding: 'utf8',
  fromOffset: 'latest',
  outOfRangeOffset: 'earliest',
};

客户:

kafkaClient = new Client({
  kafkaHost,
  idleConnection: 24 * 60 * 60 * 1000,
});

制作人:

kafkaConsumer = new ConsumerGroup(options, topics);

消费者:

kafkaProducer = new HighLevelProducer(kafkaClient);
NestedError: refreshMetadata failed
Kafka producer error: NestedError: refreshBrokenMetadata

有什么建议为什么会这样吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题