I'm trying to get the Kafka
offset using Confluent Kafka
.
This is the code I'm using to obtain it:
var offsetPosition = consumer.Position(new TopicPartition(topicConfiguration.Topic, topicConfiguration.Partition));
It always gives me a value of -1001 though. What am I doing wrong?
Additional Info
I think this is may because it is Unset
. This is what the doc says:
Unset in case there was no previous message consumed by this consumer.
I'm not sure what I should do with this though.