Interface IDurableInbox<T>

Deliveries a receiver has accepted and not yet acted on. A payload stays pending until the receiver acknowledges it, so work interrupted by a restart is found again; an acknowledged entry keeps only its id, so a replay of it is refused.

interface IDurableInbox<T> {
    accept(entry): Promise<boolean>;
    pending(): Promise<InboxEntry<T>[]>;
    acknowledge(id): Promise<void>;
}

Type Parameters

  • T

Implemented by

Methods

  • Drops the entry's payload once the receiver has acted on it; its id stays, so a replay is still refused.

    Parameters

    • id: string

    Returns Promise<void>