using Confluent.Kafka;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JiShe.CollectBus.Kafka
{
public class KafkaOptionConfig
{
///
/// kafka地址
///
public string BootstrapServers { get; set; } = null!;
///
/// 服务器标识
///
public string ServerTagName { get; set; }= "KafkaFilterKey";
///
/// 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; }
}
}