Skip to content

[Feature] Persistence behavior keys — breakers, recovery limits, bounded stash #874

Description

@pathosDev

Use case

Journal/snapshot failures currently propagate raw (no breaker), unbounded concurrent recoveries can stampede after a node restart, the recovery/persist stash is unbounded, and at-least-once redelivery has no tuning. These are cross-plugin behaviors of the persistence layer itself.

Proposed keys

actor-ts.persistence {
  max-concurrent-recoveries = 50
  recovery-event-timeout = 30s
  stash-capacity = 4096            # commands stashed during recovery/persist
  stash-overflow-strategy = fail   # fail | drop
  journal-breaker  { max-failures = 10, call-timeout = 10s, reset-timeout = 30s }
  snapshot-breaker { max-failures = 5,  call-timeout = 20s, reset-timeout = 60s }
  snapshot-is-optional = off       # recover from events when snapshot load fails
  at-least-once-delivery { redeliver-interval = 5s, redelivery-burst-limit = 10000,
                           max-unconfirmed-messages = 100000 }
  envelope.compression = off       # algorithm + threshold for stored payloads
}

Surveys: a replay filter repairing stale-writer events; a publish-events fast path that feeds live projections without polling.

Acceptance

  • A journal outage trips the breaker (fast-fails instead of piling up); recovery concurrency is capped observably.
  • Keys ship wired — tests/unit/config/NoDeadConfigKeys.test.ts rejects a key nothing reads.

Related: #628, #736

Part of the reference.conf expansion batch — tracked in #887.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: mediumUseful, not urgentproduction-goalBlocks or defines the path to production readiness

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions