CAP icon indicating copy to clipboard operation
CAP copied to clipboard

Kafka: Consumer configuration "auto.offset.reset"

Open Amakaev opened this issue 5 years ago • 2 comments

Hey, why is "auto.offset.reset" hardly set's to earliest? Can it be configured to latest? I don't wanna get all topics messages on attaching new consumer group. https://github.com/dotnetcore/CAP/blob/641d4acb266ac0538bbba4c351d9a9d041e72862/src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs#L109-L117

Amakaev avatar Apr 02 '21 13:04 Amakaev

Hello,

Thanks for your feedback , We now support rewriting the default configuration of Kafka consumer, Example:

 x.UseKafka(z =>
  {
      z.Servers = "localhost:9092";
      z.MainConfig.Add("auto.offset.reset", "latest");
  });

yang-xiaodong avatar Apr 06 '21 03:04 yang-xiaodong

Issue was fixed in 5.0.1 and released to NuGet a few minutes ago

yang-xiaodong avatar Apr 07 '21 09:04 yang-xiaodong