Interface OutboxDispatcherOptions

What an OutboxDispatcher sends from, where to, and how.

interface OutboxDispatcherOptions {
    outbox: IOutbox;
    resolve: ((destinationRef) => Promise<undefined | DeliveryDestination>);
    send?: DeliverySend;
    mail?: MailSend;
    names?: EnvelopeHeaderNames;
    clock?: IClock;
    batch?: number;
    timeoutMs?: number;
    logger?: {
        warn(msg): void;
    };
}

Properties

outbox: IOutbox

The outbox whose due deliveries it sends; one dispatcher per outbox.

resolve: ((destinationRef) => Promise<undefined | DeliveryDestination>)

A delivery's destination by its destinationRef, or undefined when the host no longer holds it.

Type declaration

How each delivery is posted; httpsSend when absent.

mail?: MailSend

Sends a delivery of kind mail; absent, such a delivery fails for its backoff and the warning names it. With it, the outbox needs markDead, so an unknown outcome can end its delivery rather than retry a send the destination may have made.

The envelope's header names; the library's defaults when absent.

clock?: IClock

What is due, and the envelope's timestamp, by this clock; the wall clock when absent.

batch?: number

Deliveries a pass takes. Default 50.

timeoutMs?: number

Each post's deadline. Default 10000.

logger?: {
    warn(msg): void;
}

Told a failed delivery's id and the error's name, never its body, its url or its secret.

Type declaration