Package-level declarations
Types
Link copied to clipboard
class PostgresFailureLedger(dataSource: DataSource, table: String = DEFAULT_TABLE, dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, service: String = DEFAULT_SERVICE, ddl: Ddl = Ddl.AUTO) : FailureLedger
The FailureLedger of one service on PostgreSQL (documentation/designs/04-subscriptions.md §2), in the service's own database: one row per parked (subscription, aggregate). The key starts with service, the service the ledger is of, then the subscription's context and name (SubscriptionId): services that share a database, and subscriptions of one name in two contexts, see and resolve only their own entries. The table's layout is recorded as format PostgresFailureLedgerTables.FORMAT (PostgresFormat), with an index answering what is due in a node's partitions and one answering a tenant's listing.