I am reading from Kafka topic, and I commit the read offsets.
Can I somehow, using the same group.id and without seeking on a particular partition as suggested here, re-read the entire topic from beginning to end?
using Kafka 1.1 my pseudo code:
var config = new Dictionary<string, object>
{
{ "group.id", "NCC1"},
...
{ "enable.auto.commit", "false"},
{ "default.topic.config", new Dictionary<string, object>
{
{ "auto.offset.reset", "earliest" }
}
}
};
using (var consumer = new Consumer<string, string>(config, new StringDeserializer(Encoding.UTF8), new StringDeserializer(Encoding.UTF8)))
{
consumer.Subscribe(new string[] { topic });
consumer.OnMessage += (_, msg) =>
{
// DO SOMETHING
onsumer.CommitAsync(msg);
};