admin管理员组文章数量:1122832
So i have my config as follows:
spring.kafka.bootstrap-servers=host
spring.kafka.consumer.group-id=group-1
spring.kafka.properties.security.protocol=SSL
spring.kafka.consumer.auto-offset-reset=earliest
listener annoation:
@KafkaListener(topics = "${kafka.topic}", containerFactory = "kafkaListenerContainerFactory")
I changed the group id from group-0 to group-1 hoping ti would start reading again. But the listener doesn't do that. What do i need to do to get the service to start reading again from the start?
So i have my config as follows:
spring.kafka.bootstrap-servers=host
spring.kafka.consumer.group-id=group-1
spring.kafka.properties.security.protocol=SSL
spring.kafka.consumer.auto-offset-reset=earliest
listener annoation:
@KafkaListener(topics = "${kafka.topic}", containerFactory = "kafkaListenerContainerFactory")
I changed the group id from group-0 to group-1 hoping ti would start reading again. But the listener doesn't do that. What do i need to do to get the service to start reading again from the start?
Share Improve this question edited Nov 23, 2024 at 14:59 OneCricketeer 191k20 gold badges141 silver badges267 bronze badges asked Nov 21, 2024 at 16:19 user1555190user1555190 3,2138 gold badges58 silver badges103 bronze badges1 Answer
Reset to default 0If group1 already existed for the topics you're trying to consume, then it's not expected to start anywhere except where it left off
auto-offset-reset=earliest
does exactly what you want. If you need to call seekToBeginning
or kafka-console-consumer --reset-offsets
, then do so
本文标签: spring kafka start reading from the start of a topicStack Overflow
版权声明:本文标题:spring kafka start reading from the start of a topic - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736308975a1933853.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论