Skip to content

Connectum API Reference / @connectum/events-amqp / types / AmqpPublishRetryOptions

Interface: AmqpPublishRetryOptions ​

Defined in: packages/events-amqp/src/types.ts:713

Tuning for the opt-in bounded publish retry (AmqpAdapterOptions.publishRetry). Backoff knobs mirror AmqpRecoveryOptions (same names, same formula — a delay never exceeds maxDelay) — but maxRetries defaults to a BOUNDED 5 here, not Infinity.

Properties ​

factor? ​

readonly optional factor?: number

Defined in: packages/events-amqp/src/types.ts:721

Exponential backoff factor.

Default ​

ts
2

initialDelay? ​

readonly optional initialDelay?: number

Defined in: packages/events-amqp/src/types.ts:717

First retry delay in ms.

Default ​

ts
100

jitter? ​

readonly optional jitter?: number

Defined in: packages/events-amqp/src/types.ts:723

Symmetric jitter factor (0..1).

Default ​

ts
0.2

maxDelay? ​

readonly optional maxDelay?: number

Defined in: packages/events-amqp/src/types.ts:719

Upper bound of every retry delay in ms; jitter never pushes a delay above it.

Default ​

ts
30000

maxRetries? ​

readonly optional maxRetries?: number

Defined in: packages/events-amqp/src/types.ts:715

Retries after the first attempt (N retries = N+1 attempts). A negative value, including -Infinity, clamps to 0 (single attempt); Infinity is honored — retry until disconnect() aborts; NaN counts as unset. A fraction is floored.

Default ​

ts
5

onRetry? ​

readonly optional onRetry?: (info) => void

Defined in: packages/events-amqp/src/types.ts:737

Observability hook, invoked once per scheduled retry. MUST NOT throw (exceptions are isolated). Scoped here deliberately — publish retries are per-operation events, not connection lifecycle, so they do not join AmqpLifecycleEvent.

Parameters ​

info ​
attempt ​

number

delay ​

number

error ​

Error

routingKey ​

string

Returns ​

void


retryOnTimeout? ​

readonly optional retryOnTimeout?: boolean

Defined in: packages/events-amqp/src/types.ts:730

Also retry AmqpPublishTimeoutError (no broker outcome within publishTimeoutMs). The message state at a timeout is UNKNOWN, so this raises the duplicate likelihood — enable only with consumer-side dedup.

Default ​

ts
false