Upstash Documentation

client.dlq.delete

2 min read

The dlq.delete method deletes one or more workflow runs from the Dead Letter Queue (DLQ).

Arguments#

You can delete DLQ entries by ID, by an array of IDs, or by filters.

By DLQ ID#

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

Or as an object with dlqIds:

By filters#

filterobject#
Show properties
workflowUrlstring#

Filter by exact workflow URL.

workflowRunIdstring#

Filter by workflow run ID.

labelstring | string[]#

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

fromDateDate | number#

Delete workflows created after this date. Accepts Date objects or Unix timestamps (ms).

toDateDate | number#

Delete workflows created before this date. Accepts Date objects or Unix timestamps (ms).

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.

Delete all#

allboolean#

Set to true to delete all DLQ entries.

Response#

deletednumber#

The number of DLQ entries that were deleted.

cursorstring#

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

Usage#