抱歉,我是 Kafka 的新手,这个问题可能很简单,但我需要一些帮助。我没有弄清楚一些配置。有一个流数据,我希望消费者只能看到 procuders 发送的最后 5 分钟的消息。我将 Confluent.Kafka 用于 .Net,
var config = new Dictionary<string, object>{
{"group.id","Test1Costumers"},
{"bootstrap.servers",brokerEndpoint},
{ "auto.commit.interval.ms", 60000},
{ "auto.offset.reset", "earliest" }
};
这是 github 示例中消费者的配置字典,另一个问题是我不想在主题中存储超过 5 分钟的消息,因为如果它们超过 5 分钟,我将不需要这些记录。
当我配置 server.properties 时;
# The minimum age of a log file to be eligible for deletion due to age
log.retention.ms=60000
一分钟后,文件当前使用的抛出错误
感谢您的帮助。
阿波罗的战车
随时随地看视频慕课网APP
相关分类