Confluent-kafka-dotnet: Latest offset before first commit

Created on 3 Jan 2018  路  1Comment  路  Source: confluentinc/confluent-kafka-dotnet

Description

When creating a new consumer for new topic and starting consuming it starts off from latest offset. For example we have 10 message in single partition topic then we wait for 11th message when starting to consume.

I use Offset.Stored value for this and further in the process I manually commit messages. So, how can I default to 0 offset commit? There were no previous manual commits made. So just a fresh topic where message was only published.

Maybe there are some configuration parameters in the cluster or topic level which I should do to achieve wanted behavior?

How to reproduce

Publish 10 messages to new topic (no consumers, yet), then after I've published it I start consuming and start off on 10th message. Expected behavior would be to start consuming from 0.

Checklist

Please provide the following information:

  • [ ] Confluent.Kafka nuget version: 0.11.1
  • [ ] Apache Kafka version: 0.10
  • [ ] Client configuration:
  • [ ] Operating system: Win7
  • [ ] Provide logs (with "debug" : "..." as necessary in configuration)
  • [ ] Provide broker log excerpts
  • [ ] Critical issue
question

Most helpful comment

Set the topic-level configuration property auto.offset.reset to earliest to make the Consumer starts from the earliest available offset when there is no usable committed offset.

>All comments

Set the topic-level configuration property auto.offset.reset to earliest to make the Consumer starts from the earliest available offset when there is no usable committed offset.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Duorman picture Duorman  路  3Comments

andreas-soroko picture andreas-soroko  路  3Comments

ietvijay picture ietvijay  路  3Comments

alfhv picture alfhv  路  3Comments

michael-huxtable picture michael-huxtable  路  4Comments