Skip to content
Get started
Get started
Automatic DLQ Retry
guide · dead letter queue

Retries that happen without you.

Some failures are transient. Auto-retry puts a due DLQ entry back into its queue, preserves its failure history, and stops after the configured retry budget.

With autoRetry enabled, a new DLQ entry receives a nextRetryAt equal to its entry time plus autoRetryInterval. The broker’s DLQ maintenance task checks due entries every 60 seconds by default, removes each due entry from the DLQ, advances its automatic retry counter, resets the job’s normal attempt and stall counters, and re-queues it. SQLite-backed queues perform the DLQ deletion and waiting-job insertion atomically.

queue.setDlqConfig({
autoRetry: true,
autoRetryInterval: 60000, // base delay: 1 minute
maxAutoRetries: 3,
});
// In TCP mode, prefer await queue.setDlqConfigAsync(...) to confirm the write.

The config lives server-side per queue, so setting it from any client applies to jobs produced and consumed in every language. The policy, retry counter, complete failure history, original entry/expiry times, and next retry time all survive a SQLite-backed broker restart.

The first retry becomes due after the base interval. Each dispatch increments retryCount; if the redelivered job fails again, its next delay follows autoRetryInterval * 2^(retryCount - 1). Once retryCount reaches maxAutoRetries, nextRetryAt becomes null and automatic redelivery stops.

DLQ Operations from the Queue ObjectThe same operations from an existing Queue instance
Dead Letter QueueWhat the DLQ is, and a first look at what failed
DLQ OperationsFilter, retry selectively, check health, purge
DLQ ConfigurationautoRetry, maxAge, maxEntries and the defaults
DLQ ReferenceFailure reasons, entry shape, every DLQ method