using System; namespace Svrnty.CQRS.Events.ConsumerGroups.PostgreSQL; /// /// Configuration options for PostgreSQL consumer group storage. /// public class PostgresConsumerGroupOptions { /// /// PostgreSQL connection string. /// public string ConnectionString { get; set; } = string.Empty; /// /// Database schema name for consumer group tables. /// Default: event_streaming /// public string SchemaName { get; set; } = "event_streaming"; /// /// Whether to automatically run migrations on startup. /// Default: true /// public bool AutoMigrate { get; set; } = true; /// /// Validates the configuration. /// public void Validate() { if (string.IsNullOrWhiteSpace(ConnectionString)) throw new ArgumentException("ConnectionString cannot be null or whitespace", nameof(ConnectionString)); if (string.IsNullOrWhiteSpace(SchemaName)) throw new ArgumentException("SchemaName cannot be null or whitespace", nameof(SchemaName)); } }