2
如果消息处理失败,则再次使用同一消息
我正在使用Confluent.Kafka .NET客户端版本1.3.0。我正在关注文档: var consumerConfig = new ConsumerConfig { BootstrapServers = "server1, server2", AutoOffsetReset = AutoOffsetReset.Earliest, EnableAutoCommit = true, EnableAutoOffsetStore = false, GroupId = this.groupId, SecurityProtocol = SecurityProtocol.SaslPlaintext, SaslMechanism = SaslMechanism.Plain, SaslUsername = this.kafkaUsername, SaslPassword = this.kafkaPassword, }; using (var consumer = new ConsumerBuilder<Ignore, string>(consumerConfig).Build()) { var cancellationToken = new CancellationTokenSource(); …