using Confluent.Kafka; namespace JiShe.CollectBus.Kafka.Internal; public class KafkaOptionConfig { /// /// kafka地址 /// public string BootstrapServers { get; set; } = null!; /// /// kafka主题副本数量 /// public short KafkaReplicationFactor { get; set; } /// /// kafka主题分区数量 /// public int NumPartitions { get; set; } /// /// 是否开启过滤器 /// public bool EnableFilter { get; set; } = true; /// /// 是否开启认证 /// public bool EnableAuthorization { get; set; } = false; /// /// 安全协议 /// public SecurityProtocol SecurityProtocol { get; set; } = SecurityProtocol.SaslPlaintext; /// /// 认证方式 /// public SaslMechanism SaslMechanism { get; set; } = SaslMechanism.Plain; /// /// 用户名 /// public string? SaslUserName { get; set; } /// /// 密码 /// public string? SaslPassword { get; set; } /// /// 订阅任务线程数量 /// 当主题未指定时,订阅任务线程数量默认为:-1 /// 优先级低于订阅任务特性TaskCount值 /// public int TaskThreadCount { get; set; } = -1; }