2025-06-06 16:00:39 +08:00

48 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

////using Confluent.Kafka;
//using System;
//using System.Collections.Generic;
//using System.Text;
//using VOL.Core.Configuration;
//namespace VOL.Core.KafkaManager
//{
// /// <summary>
// /// 配置类
// /// </summary>
// public class KafkaConfig
// {
// /// <summary>
// /// 构造配置类
// /// </summary>
// protected KafkaConfig()
// {
// //ProducerConfig = new ProducerConfig()
// //{
// // BootstrapServers = AppSetting.Kafka.ProducerSettings.BootstrapServers,// "192.168.20.241:9092",
// //};
// //ConsumerConfig = new ConsumerConfig()
// //{
// // BootstrapServers = AppSetting.Kafka.ConsumerSettings.BootstrapServers,
// // GroupId = AppSetting.Kafka.ConsumerSettings.GroupId,
// // AutoOffsetReset = AutoOffsetReset.Earliest,//当各分区下有已提交的offset时从提交的offset开始消费无提交的offset时从头开始消费
// // EnableAutoCommit = false,
// // //Kafka配置安全认证
// // //SecurityProtocol = SecurityProtocol.SaslPlaintext,
// // //SaslMechanism = SaslMechanism.Plain,
// // //SaslUsername = AppSetting.Kafka.ConsumerSettings.SaslUsername,
// // //SaslPassword = AppSetting.Kafka.ConsumerSettings.SaslPassword,
// //};
// }
// ///// <summary>
// ///// 消费者配置文件
// ///// </summary>
// //public ConsumerConfig ConsumerConfig;
// ///// <summary>
// ///// 生产者配置文件
// ///// </summary>
// //public ProducerConfig ProducerConfig;
// }
//}