Dead-letter queue
Inspect, retry, and purge jobs that exhausted their retries.
Inspect, retry, and purge jobs that exhausted their retries.
When a job exhausts its retries it moves to the dead-letter queue (DLQ) and
the job.dead event fires. The DLQ keeps
the payload and error history so you can investigate and replay.
const dead = await queue.deadLetters(); // dead-letter entries
queue.retryDead(deadId); // re-enqueue (preserves notes/metadata)
queue.deleteDead(deadId); // drop one entry
await queue.purgeDead(olderThanMs); // bulk-drop entries older than a cutoffInspect why a job failed:
await queue.getJobErrors(jobId); // per-attempt error historyFrom the CLI:
flexiq --db flexiq.db dlq list
flexiq --db flexiq.db dlq retry <deadId>A retried dead job re-enters as pending with a fresh retry budget. Notes and
metadata survive the DLQ round-trip, so context attached at enqueue is
preserved through replay.
Coming from BullMQ? BullMQ has no separate dead-letter store — exhausted jobs stay in the same queue's
failedset (queue.getFailed(),job.retry()). flexiq moves them into a distinct DLQ with its owndeadLetters()/retryDead()/purgeDead()API, so failed jobs don't clutter the same listings as active work.