Upstash Documentation

client.dlq.restart

2 min read

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#

The first argument specifies which DLQ entries to restart. The optional second argument provides flow control and retry settings.

By DLQ ID#

Pass a single DLQ ID or an array of IDs directly:

By filters#

Pass an object with a filter field:

filterobject#
Show properties
workflowUrlstring#

Filter by exact workflow URL.

workflowRunIdstring#

Filter by workflow run ID.

labelstring | string[]#

Restart workflows with this label. Pass an array to match runs that have any of the given labels (OR semantics).

fromDateDate | number#

Restart workflows created after this date.

toDateDate | number#

Restart workflows created before this date.

callerIpstring#

Filter by the IP address that triggered the workflow.

flowControlKeystring#

Filter by flow control key.

workflowCreatedAtnumber#

Filter by workflow creation time (Unix timestamp in ms).

failureFunctionStatestring#

Filter by failure callback state.

countnumber#

Maximum number of messages to process per call. Defaults to 100.

cursorstring#

A pagination cursor from a previous request.

Restart all#

allboolean#

Set to true to restart all DLQ entries.

Options (second argument)#

flowControlobject#

An optional flow control configuration to limit concurrency and execution rate of restarted workflow runs.

See Flow Control for details.

Show properties
keystring#

A logical grouping key that identifies which requests share the same flow control limits.

ratenumber#

The maximum number of allowed requests per second.

parallelismnumber#

The maximum number of concurrent requests allowed.

periodstring|number#

The time window used to enforce the defined rate limit. Default is 1s.

retriesnumber#

Number of retry attempts to apply to the restarted workflow invocation. Defaults to 3 if not provided.

Response#

cursorstring#

A pagination cursor. If not returned, all matching entries have been processed.

workflowRunsobject[]#
Show properties
workflowRunIdstring#

The ID of the new workflow run created from the restarted DLQ message.

workflowCreatedAtnumber#

The Unix timestamp (in milliseconds) when the new workflow run was created.

Usage#