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

时间:2018-07-23 16:36:58

标签: apache-kafka offset

我使用的是最新版本的Kafka 1.1.0

使用命令:

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

result



然后我尝试为主题“通知”(分区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之间的任何数字,并得到相同的错误。

什么是该错误以及如何解决?

1 个答案:

答案 0 :(得分:0)

在用于更新偏移量的命令中,您将主题设置为notification,但主题名称为notifications,带有' s '。因此notification:4-> notifications:4应该可以工作。

相关问题