Skip to main content
The dlq.restart method restarts one or more workflow runs from Dead Letter Queue (DLQ). This allows you to reprocess workflow runs that previously failed after exhausting retries.

Arguments

You can restart DLQ entries by ID or by filters.

By DLQ ID

dlqId
string|string[]
The DLQ entry ID or list of IDs to restart. Use the dlqId field from messages returned by client.dlq.list().
flowControl
object
An optional flow control configuration to limit concurrency and execution rate of restarted workflow runs.See Flow Control for details.
retries
number
Number of retry attempts to apply to the restarted workflow invocation. Defaults to 3 if not provided.

By filters

Instead of passing dlqId, you can pass a filter object:
workflowRunId
string
Filter by workflow run ID.
workflowUrl
string
Filter by exact workflow URL.
fromDate
Date | number | string
Restart workflows created after this date.
toDate
Date | number | string
Restart workflows created before this date.
label
string
Restart workflows with this label.
all
boolean
Restart all DLQ entries.

Response

client.dlq.restart() returns one or more objects containing details of the restarted workflow run(s):
workflowRuns
object[]

Usage

const { messages } = await client.dlq.list();

const response = await client.dlq.restart({
  dlqId: messages[0].dlqId, // Use the dlqId from the message
  flowControl: {
    key: "my-flow-control-key",
    parallelism: 10,
  },
  retries: 3,
});