Apache kafka Can';t将组中的卡夫卡主题重置为1

Apache kafka Can';t将组中的卡夫卡主题重置为1,apache-kafka,Apache Kafka,我有一个有两个主题的小组。我试图将其中一个的偏移量重置为1,但得到的消息是偏移量(1)低于主题分区的最早偏移量 ➜ local-kafka_2.12-2.0.0 bin/kafka-consumer-groups.sh --bootstrap-server myserver:1025 --group mygroup --topic mytopic --reset-offsets --to-offset 1 --dry-run [2019-01-31 21:41:35,664] WARN New

我有一个有两个主题的小组。我试图将其中一个的偏移量重置为
1
,但得到的消息是偏移量(1)低于主题分区的最早偏移量

➜  local-kafka_2.12-2.0.0 bin/kafka-consumer-groups.sh --bootstrap-server myserver:1025 --group mygroup --topic mytopic --reset-offsets --to-offset 1 --dry-run
[2019-01-31 21:41:35,664] WARN New offset (1) is lower than earliest offset for topic partition mytopic-0. Value will be set to 121 (kafka.admin.ConsumerGroupCommand$)

TOPIC                          PARTITION  NEW-OFFSET
mytopic                      0          121
我在尝试不同分区时收到相同的消息:

➜  local-kafka_2.12-2.0.0 bin/kafka-consumer-groups.sh --bootstrap-server myserver:1025 --group mygroup --topic mytopic:0,1,2 --reset-offsets --to-offset 1 --dry-run
[2019-01-31 21:43:16,526] WARN New offset (1) is lower than earliest offset for topic partition mytopic-0. Value will be set to 121 (kafka.admin.ConsumerGroupCommand$)
[2019-01-31 21:43:16,528] WARN New offset (1) is higher than latest offset for topic partition mytopic-1. Value will be set to 0 (kafka.admin.ConsumerGroupCommand$)
[2019-01-31 21:43:16,528] WARN New offset (1) is higher than latest offset for topic partition mytopic-2. Value will be set to 0 (kafka.admin.ConsumerGroupCommand$)

TOPIC                      PARTITION  NEW-OFFSET
mytopic                      0          121
mytopic                      1          0
mytopic                      2          0
有没有办法将偏移设置为1?或者更好的是,为什么我不能将卡夫卡主题重置为1

新偏移量(1)高于主题分区mytopic-2的最新偏移量。值将设置为0

这意味着
mytopic-2
结束偏移量为零,这主要是因为此分区中没有存储任何记录,因此不能设置大于零的偏移量

新偏移量(1)低于主题分区mytopic-0的最早偏移量。值将设置为121


这意味着
mytopic-0
开始偏移量为121,这是允许向客户端公开的最早偏移量,因此您不能为此分区设置较低的偏移量。将更新起始偏移的可能情况包括:1。日志保留;2.对数截断;3.发出kafka delete records脚本或DeleteRecords请求。

为什么不能设置较低的偏移量?如果使用不同的组ID,我可以从较低的偏移量继续,但这不是我需要的。