Package-level declarations
Types
Link copied to clipboard
class MongoFailureLedger(client: MongoClient, databaseName: String, collection: String = DEFAULT_COLLECTION, dispatcher: CoroutineDispatcher = VirtualThreads.dispatcher, service: String = DEFAULT_SERVICE, ddl: Ddl = Ddl.AUTO, operationTimeout: Duration = MongoTimeouts.OPERATION) : FailureLedger
The FailureLedger of one service on MongoDB (documentation/designs/04-subscriptions.md §2), in the service's own database: one document per parked (subscription, aggregate), keyed by a unique index on (service, subscription context, subscription, context, aggregate name, tenant, id). 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 collection's layout is recorded as format FORMAT (MongoFormat); a collection of another format, an earlier one among them, is refused, not converted.