Destination can either be a topic name or id that you configured in the
Upstash console, a valid url where the message gets sent to, or a valid
QStash API name like api/llm. If the destination is a URL, make sure
the URL is prefixed with a valid protocol (http:// or https://)
ContentType is the MIME type of the message.We highly recommend sending a Content-Type header along, as this will help
your destination API to understand the content of the message.Set this to whatever data you are sending through QStash, if your message is json, then use application/json.
Some frameworks like Next.js will not parse your body correctly if the content type is not correct.For example application/json, application/xml, application/octet-stream,
text/plain
Timeout value to set how long your endpoint is going to take.
This parameter can be used to shorten the default allowed timeout value on your plan. Examples: 1 second = "1s", 5 minutes = "5m", 2 hours = "2h"
See Max HTTP Connection Timeout on the pricing page for default values.
How often should this message be retried in case the destination API is not available.The total number of deliveries is therefore capped at 1 + retriesLeave this empty to use the default value, (free tier: 3, paid tier: 5)The backoff duration in seconds is calculated as follows: n is the number of
times the task has been retried.min(86400, e ** (2 * n))
You can send custom headers along with your message.To send a custom header, prefix the header name with Upstash-Forward-. We will
strip efix and them to the destination API.example: "Upstash-Forward-My-Header: my-value" -> "My-Header: my-value"
Using the Upstash-Callback- prefix; you can set the timeout duration, number of retries, delay to apply or more for the callback request.See the Configuring Callbacks section to learn more.
If you are using the Upstash-Callback header to define a callback url,
you can specify the headers sent along with the callback request using
the Upstash-Callback-Forward-* header.To include a header in the callback request, prefix the header name with
Upstash-Callback-Forward-. We will strip this prefix and forward the header to the callback destination..example: "Upstash-Callback-Forward-My-Header: my-value" -> "My-Header: my-value"
You can define a failure callback url that will be called when a delivery is failed.
That is when all the defined retries are exhausted.
See the content of what will be delivered to a failure callback here
The failure callback url must be prefixed with a valid protocol (http:// or https://)
Callbacks are charged as a regular message.
Callbacks will use the retry setting from the original request.
Using the Upstash-Failure-Callback- prefix; you can set the timeout duration, number of retries, delay to apply or more for the failure callback request.See the Configuring Callbacks section to learn more.
If are you using the Upstash-Failure-Callback header to define a callback url
when the delivery fails, you can specify the headers sent along with the failure
callback request using the Upstash-Failure-Callback-Forward-* header.To include a header in the callback request, add Upstash-Failure-Callback-Forward- prefix to the header name.
We will strip this prefix and forward the header to the callback destination.example: "Upstash-Failure-Callback-Forward-My-Header: my-value" -> "My-Header: my-value"
When set to true, automatically deduplicates messages based on their content,
so that only one message with the same content is published.Content based deduplication creates unique deduplication ids based on the
following message fields: