Skip to content

[Feature] Default-mailbox config block and a named mailbox registry #862

Description

@pathosDev

Use case

The system-wide mailbox defaults live in src/util/Constants.ts (DEFAULT_MAILBOX_CAPACITY = 10_000, overflow drop-head) — the single most consequential backpressure setting in the framework, and it cannot be configured. Beyond the default, named mailbox blocks let an actor pick a preconfigured mailbox by name instead of constructing options.

Proposed keys

actor-ts.mailbox {
  default {
    capacity = 10000
    overflow = drop-head        # drop-head | drop-new | reject
  }
  stash-capacity = 1024
  restart-stash-capacity = 1000
  # named blocks:
  # priority-audit { type = priority, capacity = 5000 }
}

Per-path mailbox/dispatcher selection stays with the deployment survey.

Acceptance

  • Changing default.capacity observably changes the bound of newly created actors' mailboxes.
  • Keys ship wired — tests/unit/config/NoDeadConfigKeys.test.ts rejects a key nothing reads.

Related: #772, #773, #733, #647, #661, #794

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority: highTop priority — high impact, plan nextproduction-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