Kafka consumer property 'resetOffsets' has no effect
See original GitHub issueWhile creating a consumer (and setting group id), the property spring.cloud.stream.kafka.bindings.<channelName>.consumer.resetOffsets
(as described here: http://docs.spring.io/spring-cloud-stream/docs/Brooklyn.RELEASE/reference/htmlsingle/#_kafka_consumer_properties) seems to have no effect, and consumer consumes from last offset.
Sample properties:
spring:
cloud:
stream:
bindings:
input:
destination: topic
group: sample_group
kafka:
bindings:
input:
consumer:
resetOffsets: true
startOffset: earliest
The KafkaConsumerProperties#resetOffsets
extension is set to true, but it doesn’t seem to trigger any specific resetting of offsets.
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Developers - Kafka consumer property 'resetOffsets' has no effect -
Kafka consumer property 'resetOffsets' has no effect. ... While creating a consumer (and setting group id), the property spring.cloud.stream.kafka.bindings.
Read more >Will spring-cloud-stream Kafka consumer not ... - Stack Overflow
A fixed consumer group is provided. spring.cloud.stream.bindings.input.group=sampleconsumergroup. The resetoffsets and startOffset properties ...
Read more >Spring Cloud Stream Kafka Binder Reference Guide
Map with a key/value pair containing generic Kafka consumer properties. ... Note: Using resetOffsets on the consumer does not have any effect on...
Read more >Kafka Consumer Groups & Offsets - Conduktor
The benefit of leveraging a Kafka consumer group is that the consumers within the group will coordinate to split the work of reading...
Read more >Kafka 1.1 Documentation
This tutorial assumes you are starting fresh and have no existing Kafka or ZooKeeper data ... There is a similar effect for older...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @cmuelhau,
We have another open issue for this: #63 . This is an feature loss that has been introduced by the adoption of the new Kafka client with rebalancing support (we should update documentation to reflect that). Implementation-wise this is a problem when auto-rebalance with multiple instances comes into play, as multiple arriving instances may reset multiple times without the proper coordination. We are currently deciding whether to officially drop this feature or support it only when auto-rebalancing is disabled (partition allocation is static based on
index
/instanceCount
like in 1.0).In the mean time, a solution for this would be to use a new group name when rebalance is required, which would effectively force the consumer to reset.
Really looking for the best suggestion here, as we’d really want to be able to support this, but we’re also aware that we should do so in a manner that works properly.
Thank you for the interest!
No problem. There is another specific use case where we could in principle support this, using named groups: rebalancing can be suppressed in the clients using
autoRebalanceEnable=false
- see http://docs.spring.io/autorepo/docs/spring-cloud-stream-docs/Brooklyn.BUILD-SNAPSHOT/reference/htmlsingle/#_kafka_consumer_properties. In those cases the behaviour on start (or restart) is deterministic enough so that we can consider supporting resetting offsets. We’ve thought about this for a while - happy to get some feedback here.