namespace Svrnty.CQRS.Events.Kafka; /// /// Configuration options for Kafka domain event publishing. /// public class KafkaEventOptions { /// /// Kafka bootstrap servers. Default: localhost:9092 /// public string BootstrapServers { get; set; } = "localhost:9092"; /// /// Prefix for Kafka topics. Default: domain /// Events will be published to topics like {TopicPrefix}.{category} /// public string TopicPrefix { get; set; } = "domain"; /// /// Client identifier for Kafka producer. Default: cqrs-events /// public string ClientId { get; set; } = "cqrs-events"; /// /// Enable idempotent producer for exactly-once semantics. Default: true /// public bool EnableIdempotence { get; set; } = true; /// /// Message timeout in milliseconds. Default: 30000 (30 seconds) /// public int MessageTimeoutMs { get; set; } = 30000; /// /// Security protocol. Default: Plaintext /// Options: Plaintext, Ssl, SaslPlaintext, SaslSsl /// public string SecurityProtocol { get; set; } = "Plaintext"; /// /// SASL mechanism for authentication. Optional. /// Options: Plain, ScramSha256, ScramSha512 /// public string? SaslMechanism { get; set; } /// /// SASL username for authentication. Optional. /// public string? SaslUsername { get; set; } /// /// SASL password for authentication. Optional. /// public string? SaslPassword { get; set; } /// /// Number of acknowledgements required. Default: All (-1) /// Options: None (0), Leader (1), All (-1) /// public int Acks { get; set; } = -1; /// /// Maximum number of retries. Default: 3 /// public int Retries { get; set; } = 3; /// /// Custom topic mapping function. If not set, default mapping is used. /// Maps event type name to topic name. /// public Func? TopicMapper { get; set; } }