Skip to content

basalt / webhooks/src / WebhookOutboxOptions

Interface: WebhookOutboxOptions ​

Defined in: webhooks/src/outbox.ts:103

Properties ​

batchSize? ​

> optional batchSize?: number

Defined in: webhooks/src/outbox.ts:111

Entries delivered per flush. Default 50.


concurrency? ​

> optional concurrency?: number

Defined in: webhooks/src/outbox.ts:118

Entries of one flush delivered in parallel (default 8), so one tenant's slow or failing endpoint cannot hold every other tenant's deliveries behind it.


dispatchTimeoutMs? ​

> optional dispatchTimeoutMs?: number | false

Defined in: webhooks/src/outbox.ts:131

How long a flush waits on one entry's delivery before moving on (default 10_000 ms; false = wait indefinitely). The delivery keeps running detached and its outcome is still recorded — see OutboxOptions.dispatchTimeoutMs. With the default deliverer a hanging endpoint takes up to ~4 × timeoutMs plus backoff to fail, so this is what keeps the relay ticking meanwhile.


events? ​

> optional events?: string[]

Defined in: webhooks/src/outbox.ts:107

Event patterns to capture into the outbox. Default ['**'] (all events).


intervalMs? ​

> optional intervalMs?: number

Defined in: webhooks/src/outbox.ts:109

Relay poll interval (ms). Default 5000. Set 0 to relay only manually via the OUTBOX token.


maxAttempts? ​

> optional maxAttempts?: number

Defined in: webhooks/src/outbox.ts:113

Attempts before an entry is left dead-lettered. Default 10.


onFlushError? ​

> optional onFlushError?: (error) => void

Defined in: webhooks/src/outbox.ts:136

A timer/shutdown flush failed at the store level (e.g. pending() threw). Default: console.error. Must never throw.

Parameters ​

error ​

unknown

Returns ​

void


onPermanentFailure? ​

> optional onPermanentFailure?: (entry, failures) => void

Defined in: webhooks/src/outbox.ts:138

See WebhookOutboxDispatchOptions.onPermanentFailure. Default: console.warn.

Parameters ​

entry ​

OutboxEntry

failures ​

DeliveryResult[]

Returns ​

void


store? ​

> optional store?: OutboxStore

Defined in: webhooks/src/outbox.ts:105

Durable outbox store. Default in-memory — swap for a DB-backed store in production.


tenantConcurrency? ​

> optional tenantConcurrency?: number

Defined in: webhooks/src/outbox.ts:123

Most deliveries one tenant may have in flight at once, across flushes (default ceil(concurrency / 2)). See OutboxOptions.tenantConcurrency.

Released under the MIT License.