springboot集成Kafka配置⽂件详解
1 前缀
⾸先配置的前缀是固定的,为
spring:
kafka:
consumer:
2 配置
spring boot是啥2.1 group-id
group-id: Data
2.1.1 spring boot源码的配置⽂件是这么说的
Unique string that identifies the consumer group to which this consumer belongs.
2.1.2 Kafka ⾃⾝设计的解释
消费组,消费组均衡地给消费者分配分区,每个分区只由消费组中⼀个消费者消费
2.2 auto-offset-reset
2.2.1 spring boot源码的配置⽂件是这么说的
What to do when there is no initial offset in Kafka or if the current offset no longer exists on the server.如果没有偏移量,应该怎么办
2.2.2 Kafka ⾃⾝设计的解释
如果该消费者的偏移量不存在, 设置偏移量为最新的偏移量
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论