nodejs 服务器使用 pm2 作为一个实例分支启动。
我的卡夫卡选项:
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
有什么建议为什么它不断发生?