Package-level declarations

Types

Link copied to clipboard

Publishes a service's failure ledger to the ops context: each entry as a LedgerEntry to the ops aggregate Ledger.parkedId names, through the command topic of LedgerPublishing.context (send), and each entry that is no longer parked as a LedgerResolution.

Link copied to clipboard
class LedgerPublishing @InternalWowApi constructor(val context: String = Ledger.OPS_CONTEXT, val interval: Duration = DEFAULT_INTERVAL, val automatic: Boolean = false)

Where and how often a service publishes its failure ledger: to the parked aggregate of context, through its command topic, scanning the ledger every interval. automatic publishes only while that command topic exists on the broker: the ops service creates it, so it exists once ops is deployed.

Link copied to clipboard
class MaintenanceSkips(val context: String, val work: ObservedEvent.MaintenanceSkipped.Work, ledgers: (AggregateType) -> SkipLedger?, classification: FailureClassification = RuntimeFailures.DEFAULT, observer: Observer = Observer.NONE, clock: Clock = Clock.systemUTC())

Where one bounded context's background work on its aggregates' histories, its access walks or its snapshot rewrites, records an aggregate it cannot read, so it goes on with the others instead of failing at that aggregate on every run: in the failure ledger of the aggregate's log group (ledgers), under the subscription subscription (wow.access.walk, wow.snapshot.rewrite). No worker handles it and nothing retries it automatically: a history that does not replay does not replay again without a new deployment, so an entry waits for an operator, who retries or skips it as any parked entry (me.ahoo.wow.runtime.node.ParkedOps), on any node.

Link copied to clipboard
class SkipLedger(val ledger: FailureLedger, val partitions: Int)

The failure ledger of a log group, whose log has partitions partitions: where its types' skips are parked.

Link copied to clipboard

The history of ref did not replay: the failure of its own data, which MaintenanceSkips skips at once.

Functions

Link copied to clipboard
inline fun <T> replaying(ref: AggregateRef, replay: () -> T): T

Runs replay, a replay of ref's history with no store, any failure of it an UnreplayableHistoryException, an Error of the application's code too (a NotImplementedError in its evolve, a stack overflow on this history), as a subscription's handler takes it: the aggregate is parked, and the walk or the rewrite goes on. But a cancellation, the node stopping mid-replay, which is not the aggregate's data, and a fatal error (NodeFatals.isFatal), which is the JVM's, are thrown as they are, so the work stops and parks nothing.