using Confluent.Kafka;

namespace JiShe.CollectBus.Kafka.Internal;

public class KafkaOptionConfig
{
    /// <summary>
    ///     kafka地址
    /// </summary>
    public string BootstrapServers { get; set; } = null!;
     
    /// <summary>
    ///     kafka主题副本数量
    /// </summary>
    public short KafkaReplicationFactor { get; set; }

    /// <summary>
    ///     kafka主题分区数量
    /// </summary>
    public int NumPartitions { get; set; }

    /// <summary>
    ///     是否开启过滤器
    /// </summary>
    public bool EnableFilter { get; set; } = true;

    /// <summary>
    ///     是否开启认证
    /// </summary>
    public bool EnableAuthorization { get; set; } = false;

    /// <summary>
    ///     安全协议
    /// </summary>
    public SecurityProtocol SecurityProtocol { get; set; } = SecurityProtocol.SaslPlaintext;

    /// <summary>
    ///     认证方式
    /// </summary>
    public SaslMechanism SaslMechanism { get; set; } = SaslMechanism.Plain;

    /// <summary>
    ///     用户名
    /// </summary>
    public string? SaslUserName { get; set; }

    /// <summary>
    ///     密码
    /// </summary>
    public string? SaslPassword { get; set; }

}