Skip to content

Outbox lane leasing for ordered routes #32

Closed

Description

@thomhurst

Ordered dispatch through leased lanes (design §6.4).

Scope

  • Hash the UTF-8 ordering key into N lanes (the existing EF writer uses FNV-1a).
  • Lease lanes through the leases table with database-clock membership heartbeats and fair rebalancing as instances join and leave.
  • Lane owners read pending rows in ID order with the partial (lane, id) index. Do not overtake scheduled or live-claimed heads; parked keys must not block other keys.
  • Drain connected send transactions before ownership transfers and preserve native message identity and ordering semantics.

Acceptance criteria

  • Real PostgreSQL tests cover competing connected owners, membership joins/leaves, expiry, connection termination during native send, replay and ascending visible ID order across recovery.
  • The website documents registration, immutable named options, shutdown and the at-least-once failure boundary.

Ordering boundary: Order describes committed rows visible to a scan in UUID order, not commit order between concurrent writers. Database fencing cannot retract a native request already accepted by the broker; a crash can replay an identity, and an in-flight request after database connection loss can arrive late. The implementation must document this limitation rather than claim broker-side fencing or exactly-once delivery. D34 records this protocol explicitly.

Depends on: #29 (completed).

See docs/design.md and docs/decisions.md.

Activity

  1. thomhurst commented on Nov 1, 2026

    @thomhurst
    OwnerAuthor

    Triage against origin/main bf3191f: this issue's implementation remains outstanding; the outbox packages still contain options only. Added native blocked-by dependencies on #29, matching the prerequisites already documented in the issue. Existing scope and acceptance criteria remain current.

  2. 9 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions