Kafka中auto.offset.reset配置项参数为earliest/或者latest的区别
工作中接触到通过kafka拉数据的需求,了解到offset.reset配置项,记录一下
相关代码段:
consumerGroup.setConsumer(`testKafka${new Date().getTime()}`,
Config.KafkaInput, true, OFFSET.eariest, //latest和earliest的设置
(msg) => {
console.log(JSON.stringify(msg));
}, (e
原创
2021-12-05 19:19:51 ·
8595 阅读 ·
0 评论