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

dlqId
string|string[]
required
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.

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,
});