我的Kafka消费者正在从名为 testdata
的Kafka主题中读取消息 . 使用者是Apache Flink源连接器 .
当我向主题发送新消息时,消费者不会获取消息 . 在调试日志中,我可以看到以下消息:
Ignoring fetched records for testdata at offset 0 since the current position is 1
看来我的消费者总是错误的抵消?如何从该主题获取消息?
UPDATE:
我尝试了很多带偏移设置的配置 . 我还清除了所有带有Kafka和Zookeeper偏移信息的tmp文件 . 但没有改变 . 当前位置始终是偏移量之前的一个数字 .
调试日志行的确切含义是什么?
Ignoring fetched records for testdata at offset 141 since the current position is 142
1 回答
请设置
enable.auto.commit=false