WARN 新偏移量高于最新偏移量。为什么我不能在 Kafka 中更改偏移量?

WARN New offset is higher than latest offset. Why I cannot change offset in Kafka?

我用的是最新版本的Kafka 1.1.0

使用命令:

./kafka-consumer-groups.sh --bootstrap-server localhost:9093 --describe --group notifications-service-group



然后我尝试更改主题 "notification" 的偏移量,分区 № 4:

./kafka-consumer-groups.sh --bootstrap-server localhost:9093 --group notifications-service-group --reset-offsets --topic notification:4 --to-offset 229400

我看到错误:
WARN 新偏移量 (229400) 高于主题分区通知 4 的最新偏移量。值将设置为 0 (kafka.admin.ConsumerGroupCommand$)

我尝试使用 1 到 229400 之间的任何数字并得到相同的错误。

这个错误是什么意思,如何解决?

在更新偏移量的命令中,您将主题设置为 notification,但主题名称是 notifications,带有“s”。所以 notification:4 -> notifications:4 应该有效。