Make songConsumerGrp use latest offset if consumer group is missing and last committed if it exists
Opened this issue · 0 comments
jaserud commented
Currently if the consumer group is deleted maestro will recreate the group and start consuming messages from the earliest available offset
Detailed Description
- if the consumer group is deleted maestro will recreate the group and start consuming messages from the earliest available offset
- this could make unexpected changes to es index while it is in use
Possible Implementation
-
In spring if we set resetOffset to
false
and startOffset tolatest
on a binding it will consume from the latest offset if the consumer group is new or it will consume from the last committed offset if the consumer group exists
mroe info: https://docs.spring.io/spring-cloud-stream-binder-kafka/docs/3.1.4/reference/html/spring-cloud-stream-binder-kafka.html#reset-offsets -
add
spring.cloud.stream.kafka.bindings.songInput.consumer.startOffset: latest
andspring.cloud.stream.kafka.bindings.songInput.consumer.resetOffset: false
to appconfig so it behaves this way by default -
here: