@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface OutboxClaimOptions

    interface OutboxClaimOptions {
        owner: string;
        leaseMs: number;
        now: number;
        limit: number;
        reclaimOwn?: boolean;
        partitions?: (key: string) => boolean;
        reclaimOwnBefore?: number;
    }

    Hierarchy (View Summary)

    Index
    owner: string

    Who takes the lease.

    leaseMs: number

    Lease duration in ms.

    now: number

    Current time (epoch ms).

    limit: number

    Max records to claim.

    reclaimOwn?: boolean

    Also take records leased by owner itself whose lease has not expired yet: a restarted process with a stable instanceId reclaims what its previous incarnation left in flight, without waiting for the lease to expire.

    partitions?: (key: string) => boolean

    Only claim records whose partition (inbox) or chat (outbox) passes this filter (multi-replica ownership).

    reclaimOwnBefore?: number

    With reclaimOwn: re-claim an own sending record only when its lease ends before this time (epoch ms). A restarted replica's first sweep passes recoveredAt + leaseMs: the leases its dead incarnation took end earlier, the ones it took itself since then end later, so it never steals a send it is making (which would leave that send's completion with a superseded fencing token). A journal that ignores it re-claims every own lease.