using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace YLErp.Model { public class KafkaConfig { /// /// Kafka 集群的地址 /// public string BootstrapServers { get; set; } /// /// 消息确认方式,可以是 All(-1)、Leader(1)、None(0) 中的一种 /// public int Acks { get; set; } /// /// 开启幂等性,确保消息只被发送一次 /// public bool EnableIdempotence { get; set; } /// /// 控制生产者在同一时间最多可以发送的未确认消息数 /// public int MaxInFlight { get; set; } /// /// 消息压缩方式,可以是 None(0)、Gzip(1)、Snappy(2)、Lz4(3)、Zstd(4) 中的一种 /// public int CompressionType { get; set; } /// /// 控制生产者等待消息确认的时间,单位是毫秒 /// public int MessageTimeoutMs { get; set; } /// /// 客户互换费率topic /// public string ClientRateTopic { get; set; } /// /// 客户对冲账户topic /// public string HedgingAccountTopic { get; set; } /// /// 账户资金请求返回topic /// public string OnRspAccountCapitalTopic { get; set; } /// /// 互换自动簿记消费者topic /// public string OnRspInterestRateSwapInsertTopic { get; set; } /// /// 互换自动簿记消费组 /// public string OnRspInterestRateSwapInsertTopicGroupId { get; set; } public string AccountCapitalTopicGroupId { get; set; } public int AutoOffsetReset { get; set; } /// /// TRS合约数据推送topic(对外,如onebp等) /// public string ContractTopic { get; set; } = "onederi.trs.onebp.contract.v1"; } }