Java 卡夫卡-忽略获取的记录
我的卡夫卡消费者正在阅读来自名为Java 卡夫卡-忽略获取的记录,java,apache-kafka,apache-flink,kafka-consumer-api,Java,Apache Kafka,Apache Flink,Kafka Consumer Api,我的卡夫卡消费者正在阅读来自名为testdata的卡夫卡主题的消息。使用者是Apache Flink源连接器 当我向主题发送新消息时,消费者不会获取消息。在调试日志中,我可以看到以下消息: Ignoring fetched records for testdata at offset 0 since the current position is 1 看来我的消费者总是冲错了?我可以做些什么来获取该主题的信息 更新: 我尝试了很多偏移设置的配置。我还清除了所有带有卡夫卡和Zookeeper偏移
testdata
的卡夫卡主题的消息。使用者是Apache Flink源连接器
当我向主题发送新消息时,消费者不会获取消息。在调试日志中,我可以看到以下消息:
Ignoring fetched records for testdata at offset 0 since the current position is 1
看来我的消费者总是冲错了?我可以做些什么来获取该主题的信息
更新:
我尝试了很多偏移设置的配置。我还清除了所有带有卡夫卡和Zookeeper偏移信息的tmp文件。但一切都没有改变。当前位置始终比偏移量提前一个数字
调试日志行的确切含义是什么
Ignoring fetched records for testdata at offset 141 since the current position is 142
请设置
enable.auto.commit=false
请设置enable.auto.commit=false
尝试将使用者的group.id设置为其他或随机UUID。还可以尝试将auto.offset.reset属性设置为earlime.related链接来解释这一点:尝试将使用者的group.id设置为不同的或随机的UUID。另外,请尝试将auto.offset.reset属性设置为Earlish.related链接,以解释以下内容: