Class PostgresSagaOptions
Configuration options for the Postgres saga store.
public sealed class PostgresSagaOptions
- Inheritance
-
PostgresSagaOptions
- Inherited Members
Remarks
The saga store uses Postgres's JSONB column type for efficient saga state storage, enabling fast reads and writes while preserving the full state structure.
The default configuration uses the "dispatch" schema with a "sagas" table, following Postgres naming conventions with snake_case column names.
Properties
CommandTimeoutSeconds
Gets or sets the command timeout in seconds.
[Range(1, 2147483647)]
public int CommandTimeoutSeconds { get; set; }
Property Value
- int
The timeout duration for database commands. Defaults to 30 seconds.
ConnectionString
Gets or sets the Postgres connection string.
[Required]
public string ConnectionString { get; set; }
Property Value
- string
The connection string for the Postgres database.
QualifiedTableName
Gets the fully qualified table name including schema.
public string QualifiedTableName { get; }
Property Value
- string
The qualified table name in format "schema"."table".
Schema
Gets or sets the schema name for the saga table.
[Required]
public string Schema { get; set; }
Property Value
- string
The database schema name. Defaults to "dispatch".
TableName
Gets or sets the table name for saga entries.
[Required]
public string TableName { get; set; }
Property Value
- string
The table name. Defaults to "sagas".
Methods
Validate()
Validates the configuration options.
public void Validate()
Exceptions
- ArgumentException
Thrown when ConnectionString, Schema, or TableName is null or whitespace.
- ArgumentOutOfRangeException
Thrown when CommandTimeoutSeconds is less than or equal to zero.