Bulk Retry DLQ messages
curl --request POST \
--url https://qstash.upstash.io/v2/dlq/retry \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash.upstash.io/v2/dlq/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash.upstash.io/v2/dlq/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qstash.upstash.io/v2/dlq/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qstash.upstash.io/v2/dlq/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qstash.upstash.io/v2/dlq/retry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash.upstash.io/v2/dlq/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cursor": "<string>",
"responses": [
{
"messageId": "<string>",
"deduplicated": true
}
]
}{
"error": "<string>"
}DLQ
Bulk Retry DLQ messages
Retry delivery of multiple messages from the DLQ
POST
/
v2
/
dlq
/
retry
Bulk Retry DLQ messages
curl --request POST \
--url https://qstash.upstash.io/v2/dlq/retry \
--header 'Authorization: Bearer <token>'import requests
url = "https://qstash.upstash.io/v2/dlq/retry"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://qstash.upstash.io/v2/dlq/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qstash.upstash.io/v2/dlq/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://qstash.upstash.io/v2/dlq/retry"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://qstash.upstash.io/v2/dlq/retry")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://qstash.upstash.io/v2/dlq/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cursor": "<string>",
"responses": [
{
"messageId": "<string>",
"deduplicated": true
}
]
}{
"error": "<string>"
}When DLQ messages are retried, new messages with the same body and headers are created and scheduled for delivery.
The original DLQ messages are then removed from the DLQ.
You can pass all configuration headers to override the configuration of the original messages.For example, if the retry count of the original messages is 5, you can set it to 0 for the retried messages by passing
Upstash-Retries: 0 header to this request.
Check out publish documentation for complete list of configuration options you can pass.Authorizations
bearerAuthbearerAuthQuery
QStash authentication token
Query Parameters
List of DLQ IDs to retry. If provided, other filters are ignored.
Filter DLQ messages by message ID
Filter DLQ messages by destination URL
Filter DLQ messages by URL Group name
Filter DLQ messages by schedule ID
Filter DLQ messages by queue name
Filter DLQ messages by starting date, in milliseconds (Unix timestamp). This is inclusive.
Filter DLQ messages by ending date, in milliseconds (Unix timestamp). This is inclusive.
Filter DLQ messages by HTTP response status code of the last delivery attempt
Filter DLQ messages by IP address of the publisher
Filter DLQ messages by the label of the message assigned by the user
Filter DLQ messages by Flow Control Key
Was this page helpful?