1.忘了截图了。也没有办法还原,反正最后成功了,
(1:)换个 group id 就可以。 scala 代码开发方式
(2:)scala 解决办法
public static final String GROUP_ID_CONFIG = "group.id";
private static final String GROUP_ID_DOC = "A unique string that identifies the consumer group this consumer belongs to. This property is required if the consumer uses either the group management functionality by using <code>subscribe(topic)</code> or the Kafka-based offset management strategy.";
中的 subscribe 方法指定偏移量
(3)java 方法 感谢大佬 jannals 原博客网址 https://4m.cn/JcFj1 我缩短了下
1. 使用不同的组名,并且通过 consumer.assign
@Test
public void testModifyOffsetForReConsumer() {
Properties props = new Properties();
props.put(ConsumerConfig.MAX_POLL_RECORDS_CONFIG, 10