The dlq.resume method resumes one or more workflow runs from the Dead Letter Queue (DLQ) at the point where they previously failed.
This allows you to continue execution from the failed step instead of restarting the workflow from the beginning.
Arguments
The first argument specifies which DLQ entries to resume. The optional second argument provides flow control and retry settings.
By DLQ ID
Pass a single DLQ ID or an array of IDs directly:
await client . dlq . resume ( "dlq-12345" );
await client . dlq . resume ([ "dlq-12345" , "dlq-67890" ]);
By filters
Pass an object with a filter field:
Filter by exact workflow URL.
Filter by workflow run ID.
Resume workflows with this label. Pass an array to match runs that
have any of the given labels (OR semantics).
Resume workflows created after this date.
Resume workflows created before this date.
Filter by the IP address that triggered the workflow.
Filter by flow control key.
Filter by workflow creation time (Unix timestamp in ms).
Filter by failure callback state.
Maximum number of messages to process per call. Defaults to 100.
A pagination cursor from a previous request.
Resume all
Set to true to resume all DLQ entries.
Options (second argument)
An optional flow control configuration to limit concurrency and execution rate
of resumed workflow runs. See Flow Control for details. A logical grouping key that identifies which resumed runs share the same flow control limits.
The maximum number of allowed resumption requests per second.
The maximum number of resumed runs that can execute concurrently.
The time window used to enforce the defined rate limit. Default is 1s.
Number of retry attempts to apply when resuming the workflow run.
Defaults to 3 if not provided.
Response
A pagination cursor. If not returned, all matching entries have been processed.
The ID of the workflow run resumed from the DLQ message.
The Unix timestamp (in milliseconds) when the resumed run was created.
Usage
Single
Multiple
By filters
All
const { messages } = await client . dlq . list ();
const response = await client . dlq . resume ( messages [ 0 ]. dlqId , {
flowControl: {
key: "my-flow-control-key" ,
parallelism: 10 ,
},
retries: 3 ,
});