# Queues and queue configuration

> Create and configure pushq queues: every setting with defaults and limits, queue states, pause, resume, purge, delete, folders and the stats API.

Source: https://pushqueue.dev/docs/concepts/queues/

A pushq queue holds tasks and decides how they are delivered: how fast, how many at once, how failures are retried, and where relative paths point. This page covers creating and configuring queues, every queue setting, pausing, purging and deleting queues, queue folders, and queue stats.

Use one queue per kind of work (`emails`, `webhooks`), or one per customer when each needs its own rate limit (see [Rate limits](https://pushqueue.dev/docs/guides/rate-limits/)).

The examples on this page assume a client named `pq` (see [Install & configure an SDK](https://pushqueue.dev/docs/getting-started/sdks/)). Parameter tables use the JSON field names; the SDKs use their language's casing (`maxDispatchesPerSecond` in TypeScript and Java, `max_dispatches_per_second` in Python, `MaxDispatchesPerSecond` in Go and .NET).


**TypeScript**

```ts

const pq = new Pushq({ apiKey: process.env.PUSHQ_API_KEY });
```

**Python**

```python
import os
from pushq import Pushq, RateLimits, Retry, Target

pq = Pushq(api_key=os.environ["PUSHQ_API_KEY"])
```

**Go**

```go
import pushq "github.com/blissfulrays/pushq/sdks/go"

pq := pushq.New("", os.Getenv("PUSHQ_API_KEY")) // "" = hosted API
ctx := context.Background()
```

**Java**

```java
import io.pushq.*;

Pushq pq = Pushq.builder().apiKey(System.getenv("PUSHQ_API_KEY")).build();
```

**.NET**

```csharp
using Pushq;

using var pq = new PushqClient(apiKey: Environment.GetEnvironmentVariable("PUSHQ_API_KEY"));
```

**curl**

```bash
export PUSHQ_API_KEY=pq_...
```

## Create a queue

There are two ways to create a queue.

### Create or update a queue with PUT (upsert)

`PUT /v1/queues/{queue}` is an idempotent upsert. It creates the queue if it doesn't exist and replaces its configuration if it does. It is cheap enough to call before every enqueue, so your code never has to check whether a queue exists.


**TypeScript**

```ts
await pq.upsertQueue("emails", {
  rateLimits: { maxDispatchesPerSecond: 10, maxConcurrentDispatches: 5 },
  retry: { maxAttempts: 5, minBackoffSeconds: 1, maxBackoffSeconds: 300 },
  target: { baseUrl: "https://api.example.com" },
});
```

**Python**

```python
pq.upsert_queue(
    "emails",
    rate_limits=RateLimits(max_dispatches_per_second=10, max_concurrent_dispatches=5),
    retry=Retry(max_attempts=5, min_backoff_seconds=1, max_backoff_seconds=300),
    target=Target(base_url="https://api.example.com"),
)
```

**Go**

```go
_, err := pq.UpsertQueue(ctx, "emails", pushq.QueueConfig{
	RateLimits: &pushq.RateLimits{
		MaxDispatchesPerSecond:  pushq.Float64(10),
		MaxConcurrentDispatches: pushq.Int(5),
	},
	Retry: &pushq.Retry{
		MaxAttempts:       pushq.Int(5),
		MinBackoffSeconds: pushq.Float64(1),
		MaxBackoffSeconds: pushq.Float64(300),
	},
	Target: &pushq.Target{BaseURL: "https://api.example.com"},
})
```

**Java**

```java
pq.upsertQueue("emails", QueueConfig.builder()
    .rateLimits(RateLimits.builder().maxDispatchesPerSecond(10).maxConcurrentDispatches(5).build())
    .retry(RetryConfig.builder().maxAttempts(5).minBackoffSeconds(1).maxBackoffSeconds(300).build())
    .target(Target.builder().baseUrl("https://api.example.com").build())
    .build());
```

**.NET**

```csharp
await pq.UpsertQueueAsync("emails", new QueueConfig
{
    RateLimits = new RateLimits { MaxDispatchesPerSecond = 10, MaxConcurrentDispatches = 5 },
    Retry = new RetryConfig { MaxAttempts = 5, MinBackoffSeconds = 1, MaxBackoffSeconds = 300 },
    Target = new Target { BaseUrl = "https://api.example.com" },
});
```

**curl**

```bash
curl -X PUT https://api.pushqueue.dev/v1/queues/emails \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{
    "rate_limits": {"max_dispatches_per_second": 10, "max_concurrent_dispatches": 5},
    "retry": {"max_attempts": 5, "min_backoff_seconds": 1, "max_backoff_seconds": 300},
    "target": {"base_url": "https://api.example.com"}
  }'
```

The response is the queue. The status is `201` when the queue was created and `200` otherwise, and the `X-Pushq-Result` header says what happened: `created`, `updated` or `unchanged`.

PUT never changes the queue's [state](#queue-states), so calling it on every enqueue can't accidentally resume a paused queue.

:::caution
PUT sets the **whole** configuration. Any field you leave out goes back to its default: if you PUT only `rate_limits`, the retry settings reset to defaults and `target.base_url`, `target.headers` and `dead_letter_queue` are cleared. The one exception is `target.signing_secret`, which is kept when omitted. To change a single field, use [PATCH](#update-queue-settings-with-patch).
:::

### Create a queue only if it doesn't exist (POST)

`POST /v1/queues` creates a queue and fails with `409 already_exists` if the name is taken. The body is the same as PUT plus a `name` field.


**TypeScript**

```ts
await pq.createQueue("emails", { rateLimits: { maxDispatchesPerSecond: 10 } });
```

**Python**

```python
pq.create_queue("emails", rate_limits=RateLimits(max_dispatches_per_second=10))
```

**Go**

```go
_, err := pq.CreateQueue(ctx, "emails", pushq.QueueConfig{
	RateLimits: &pushq.RateLimits{MaxDispatchesPerSecond: pushq.Float64(10)},
})
```

**Java**

```java
pq.createQueue("emails", QueueConfig.builder()
    .rateLimits(RateLimits.builder().maxDispatchesPerSecond(10).build())
    .build());
```

**.NET**

```csharp
await pq.CreateQueueAsync("emails", new QueueConfig
{
    RateLimits = new RateLimits { MaxDispatchesPerSecond = 10 },
});
```

**curl**

```bash
curl -X POST https://api.pushqueue.dev/v1/queues \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{"name": "emails", "rate_limits": {"max_dispatches_per_second": 10}}'
```

Use this when creating a queue that already exists should be an error, for example in a provisioning script. New queues always start in the `running` state.

## Queue configuration reference

All fields are optional. Omitted fields take the default shown.

### Rate limit settings

| Parameter | Type | Default | Description |
|---|---|---|---|
| `rate_limits.max_dispatches_per_second` | number | `500` | Token refill rate. Must be greater than 0 and at most 10000. Fractions are allowed: `0.5` is one dispatch every two seconds. |
| `rate_limits.max_burst_size` | integer | `0` (auto) | Token bucket size, 0 to 10000. `0` means auto: `max_dispatches_per_second` rounded up, between 1 and 500. Responses always show the resolved value. |
| `rate_limits.max_concurrent_dispatches` | integer | `1000` | Maximum requests in flight at once for this queue, 1 to 10000. |

How these interact, and how to pick values, is covered in the [Rate limits guide](https://pushqueue.dev/docs/guides/rate-limits/).

:::note
Because responses show the resolved burst, reading a queue and sending its `rate_limits` back in a PUT turns an auto burst into a fixed one. Send `max_burst_size: 0` (or omit it) to keep it automatic.
:::

### Retry settings

| Parameter | Type | Default | Description |
|---|---|---|---|
| `retry.max_attempts` | integer | `100` | Total attempts, including the first. `-1` means unlimited. `0` is rejected. |
| `retry.max_retry_duration_seconds` | number | `0` (unlimited) | How long after the first attempt retries may continue. Must be 0 or more. |
| `retry.min_backoff_seconds` | number | `0.1` | Delay before the first retry. Must be 0 or more. |
| `retry.max_backoff_seconds` | number | `3600` | Upper bound on any delay. Must be at least `min_backoff_seconds`. |
| `retry.max_doublings` | integer | `16` | How many times the delay doubles before growing linearly, 0 to 31. |

The exact schedule, and how `max_attempts` and `max_retry_duration_seconds` combine, are explained in [Retries](https://pushqueue.dev/docs/concepts/retries/). Tasks can override any of these individually.

### Target settings: base URL, method, headers and signing secret

| Parameter | Type | Default | Description |
|---|---|---|---|
| `target.base_url` | string | none | Absolute `http` or `https` URL. Tasks created with a relative `path` are sent to `base_url` + `path`. Without it, every task must have an absolute `url`. |
| `target.method` | string | none | When set, overrides every task's HTTP method. One of `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`. |
| `target.headers` | object | none | Headers added to every delivery. They win over task headers with the same name. At most 16 KiB in total (names plus values). |
| `target.signing_secret` | string | none | Standard Webhooks secret (`whsec_...`). When set, every delivery is signed. Never returned; responses show `has_signing_secret` instead. |

The target is applied at delivery time, so changing `base_url` or `headers` affects tasks that are already queued. See [Delivery](https://pushqueue.dev/docs/concepts/delivery/) for the full request pushq sends.

`target.headers` can't contain `Host`, `Content-Length`, `Transfer-Encoding`, `Connection`, `Keep-Alive`, `Upgrade`, `TE` or `Trailer`, and values can't contain control characters such as CR, LF or NUL.

`signing_secret` has special update rules: omit it to keep the stored secret, send `""` to remove it.

### Dead-letter queue

| Parameter | Type | Default | Description |
|---|---|---|---|
| `dead_letter_queue` | string | none | Name of another queue that receives a copy of each task that runs out of retries. Can't be the queue itself. |

See [Dead-letter queues](https://pushqueue.dev/docs/concepts/dead-letter-queues/).

### Queue name rules

Names are lowercase and made of one or more segments separated by `/`. Each segment matches `[a-z0-9][a-z0-9-]*` (starts with a letter or digit, then letters, digits and hyphens). The whole name is at most 200 characters. See [Folders](#queue-folders).

## Update queue settings with PATCH

`PATCH /v1/queues/{queue}` changes only the fields you send and leaves everything else alone. The merged result is validated before it is saved, so a PATCH can never leave a queue with invalid settings.


**TypeScript**

```ts
await pq.patchQueue("emails", { rateLimits: { maxDispatchesPerSecond: 2 } });
```

**Python**

```python
pq.patch_queue("emails", rate_limits=RateLimits(max_dispatches_per_second=2))
```

**Go**

```go
_, err := pq.PatchQueue(ctx, "emails", pushq.QueueConfig{
	RateLimits: &pushq.RateLimits{MaxDispatchesPerSecond: pushq.Float64(2)},
}, "") // last argument: new state, "" = unchanged
```

**Java**

```java
pq.patchQueue("emails", QueuePatch.builder()
    .rateLimits(RateLimits.builder().maxDispatchesPerSecond(2).build())
    .build());
```

**.NET**

```csharp
await pq.PatchQueueAsync("emails", new QueuePatch
{
    RateLimits = new RateLimits { MaxDispatchesPerSecond = 2 },
});
```

**curl**

```bash
curl -X PATCH https://api.pushqueue.dev/v1/queues/emails \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{"rate_limits": {"max_dispatches_per_second": 2}}'
```

PATCH differs from PUT in these ways (Go's `PatchQueue` only sends non-empty strings, so it can't clear `base_url`, `method`, `headers` or `dead_letter_queue`; use the HTTP API for that, or `ClearSigningSecret: true` for the secret):

- It accepts a `state` field: `running`, `paused` or `disabled`.
- `target.headers`, when sent, replaces the whole header map. Send `{}` to remove all queue headers.
- `target.signing_secret: ""` removes the secret, `target.base_url: ""` removes the base URL, and `dead_letter_queue: ""` removes the dead-letter queue.

Changes take effect for the next dispatch, including tasks already waiting in the queue. Use this when you want to adjust one setting at runtime, such as lowering a rate limit during an incident.

## Queue states

| State | Accepts new tasks | Dispatches tasks | `:run` works |
|---|---|---|---|
| `running` | Yes | Yes | Yes |
| `paused` | Yes | No | Yes |
| `disabled` | No (`400 failed_precondition`) | No | No (`400 failed_precondition`) |

In every state you can still read the queue, list its tasks, read stats, change its configuration and purge it.

Pausing or disabling a queue doesn't interrupt requests already in flight; they finish normally. If one of them fails, its retry is scheduled and waits until the queue runs again.

### Pause and resume a queue


**TypeScript**

```ts
await pq.pauseQueue("emails");
await pq.resumeQueue("emails");
```

**Python**

```python
pq.pause_queue("emails")
pq.resume_queue("emails")
```

**Go**

```go
_, err := pq.PauseQueue(ctx, "emails")
_, err = pq.ResumeQueue(ctx, "emails")
```

**Java**

```java
pq.pauseQueue("emails");
pq.resumeQueue("emails");
```

**.NET**

```csharp
await pq.PauseQueueAsync("emails");
await pq.ResumeQueueAsync("emails");
```

**curl**

```bash
curl -X POST https://api.pushqueue.dev/v1/queues/emails:pause \
  -H "Authorization: Bearer $PUSHQ_API_KEY"

curl -X POST https://api.pushqueue.dev/v1/queues/emails:resume \
  -H "Authorization: Bearer $PUSHQ_API_KEY"
```

Both return the queue. Pausing a `disabled` queue fails with `400 failed_precondition`; `:resume` moves a queue from either `paused` or `disabled` back to `running`.

Use pause when the endpoint is down or misbehaving and you want tasks to pile up safely instead of using up their retries. Tasks whose time has passed are delivered as soon as you resume, within the queue's rate limits.

### Disable a queue

There is no `:disable` endpoint; set the state with PATCH:


**TypeScript**

```ts
await pq.patchQueue("emails", { state: "disabled" });
```

**Python**

```python
pq.patch_queue("emails", state="disabled")
```

**Go**

```go
_, err := pq.PatchQueue(ctx, "emails", pushq.QueueConfig{}, "disabled")
```

**Java**

```java
pq.patchQueue("emails", QueuePatch.builder().state("disabled").build());
```

**.NET**

```csharp
await pq.PatchQueueAsync("emails", new QueuePatch { State = QueueState.Disabled });
```

**curl**

```bash
curl -X PATCH https://api.pushqueue.dev/v1/queues/emails \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{"state": "disabled"}'
```

Use this when producers must stop enqueuing to a queue, for example while you retire it. Re-enable it with `:resume` or a PATCH to `running`.

## Purge all tasks from a queue

`POST /v1/queues/{queue}:purge` deletes every task created up to now, in any state (pending, running, succeeded or failed). It answers `202` with the queue; `purged_at` shows the purge time.


**TypeScript**

```ts
await pq.purgeQueue("emails");
```

**Python**

```python
pq.purge_queue("emails")
```

**Go**

```go
_, err := pq.PurgeQueue(ctx, "emails")
```

**Java**

```java
pq.purgeQueue("emails");
```

**.NET**

```csharp
await pq.PurgeQueueAsync("emails");
```

**curl**

```bash
curl -X POST https://api.pushqueue.dev/v1/queues/emails:purge \
  -H "Authorization: Bearer $PUSHQ_API_KEY"
```

How it behaves:

- The cut-off is exact: every task created before the purge disappears from the API immediately, and the rows are removed in the background.
- Tasks created after the purge are not affected, even within the same millisecond.
- Requests already in flight can still reach your endpoint, but their results are discarded and they are not retried.
- Task IDs of purged tasks can be reused right away, without waiting for the [dedup window](https://pushqueue.dev/docs/concepts/tasks/#task-ids-and-deduplication).
- The queue's configuration and state are unchanged.

Use this to throw away a backlog you no longer want delivered, such as tasks built from bad data.

## Delete a queue

`DELETE /v1/queues/{queue}` deletes the queue together with all of its tasks and their attempt history. It answers `204`. The name can be reused immediately.


**TypeScript**

```ts
await pq.deleteQueue("emails");
```

**Python**

```python
pq.delete_queue("emails")
```

**Go**

```go
err := pq.DeleteQueue(ctx, "emails")
```

**Java**

```java
pq.deleteQueue("emails");
```

**.NET**

```csharp
await pq.DeleteQueueAsync("emails");
```

**curl**

```bash
curl -X DELETE https://api.pushqueue.dev/v1/queues/emails \
  -H "Authorization: Bearer $PUSHQ_API_KEY"
```

Deleting needs more than write access: admin API keys and admin or member dashboard users can delete queues; writer API keys get `403 permission_denied`. Requests already in flight may still reach your endpoint, but their results are discarded.

## Get and list queues

`GET /v1/queues/{queue}` returns one queue. Any role can read a queue it knows by name.

`GET /v1/queues` lists queues in name order:

| Query parameter | Default | Description |
|---|---|---|
| `name_prefix` | none | Only queues whose name starts with this string, such as `tenants/`. |
| `page_size` | `100` | Results per page, up to 1000. |
| `page_token` | none | `next_page_token` from the previous page. |


**TypeScript**

```ts
let pageToken: string | undefined;
do {
  const page = await pq.listQueues({ namePrefix: "tenants/", pageToken });
  for (const q of page.items) console.log(q.name, q.state);
  pageToken = page.nextPageToken;
} while (pageToken);
```

**Python**

```python
page_token = None
while True:
    page = pq.list_queues(name_prefix="tenants/", page_token=page_token)
    for q in page.items:
        print(q.name, q.state)
    page_token = page.next_page_token
    if not page_token:
        break
```

**Go**

```go
token := ""
for {
	queues, next, err := pq.ListQueues(ctx, pushq.ListQueuesParams{NamePrefix: "tenants/", PageToken: token})
	if err != nil {
		return err
	}
	for _, q := range queues {
		fmt.Println(q.Name, q.State)
	}
	if next == "" {
		break
	}
	token = next
}
```

**Java**

```java
String token = null;
do {
    QueuePage page = pq.listQueues(ListQueuesParams.builder().namePrefix("tenants/").pageToken(token).build());
    for (Queue q : page.getQueues()) System.out.println(q.getName() + " " + q.getState());
    token = page.getNextPageToken();
} while (token != null && !token.isEmpty());
```

**.NET**

```csharp
string? token = null;
do
{
    var page = await pq.ListQueuesAsync(new ListQueuesOptions { NamePrefix = "tenants/", PageToken = token });
    foreach (var q in page.Items) Console.WriteLine($"{q.Name} {q.State}");
    token = page.NextPageToken;
} while (token != null);
```

**curl**

```bash
curl "https://api.pushqueue.dev/v1/queues?name_prefix=tenants/" \
  -H "Authorization: Bearer $PUSHQ_API_KEY"
```

Listing needs list permission: admin API keys and every dashboard user have it, writer API keys don't. Writer keys are meant for apps that work with queues they already know by name.

A queue response looks like this:

```json
{
  "name": "emails",
  "state": "running",
  "rate_limits": {"max_dispatches_per_second": 10, "max_burst_size": 10, "max_concurrent_dispatches": 5},
  "retry": {"max_attempts": 5, "max_retry_duration_seconds": 0, "min_backoff_seconds": 1, "max_backoff_seconds": 300, "max_doublings": 16},
  "target": {"base_url": "https://api.example.com", "has_signing_secret": false},
  "created_at": "2026-11-28T10:00:00Z",
  "updated_at": "2026-11-28T10:00:00Z"
}
```

`target.method`, `target.headers`, `dead_letter_queue` and `purged_at` appear when set.

## Queue folders

A `/` in a queue name puts the queue in a folder: `user/instagram` is an `instagram` queue in a `user` folder, and folders can nest (`user/tiktok/eu`). Folders are only part of the name. They need no setup, have no settings of their own, and exist as long as some queue name uses them. Each queue in a folder is still independent, with its own limits and retry settings.

In API paths, the whole name is a single path segment, so encode `/` as `%2F`. The SDKs do this for you, so pass the name as is:


**TypeScript**

```ts
await pq.upsertQueue("user/instagram", { target: { baseUrl: "https://api.example.com" } });
await pq.createTask("user/instagram", { path: "/hooks/post" });
```

**Python**

```python
pq.upsert_queue("user/instagram", target=Target(base_url="https://api.example.com"))
pq.create_task("user/instagram", path="/hooks/post")
```

**Go**

```go
_, err := pq.UpsertQueue(ctx, "user/instagram", pushq.QueueConfig{
	Target: &pushq.Target{BaseURL: "https://api.example.com"},
})
_, err = pq.CreateTask(ctx, "user/instagram", pushq.TaskCreate{Path: "/hooks/post"})
```

**Java**

```java
pq.upsertQueue("user/instagram", QueueConfig.builder()
    .target(Target.builder().baseUrl("https://api.example.com").build())
    .build());
pq.createTask("user/instagram", TaskCreate.builder().path("/hooks/post").build());
```

**.NET**

```csharp
await pq.UpsertQueueAsync("user/instagram", new QueueConfig
{
    Target = new Target { BaseUrl = "https://api.example.com" },
});
await pq.CreateTaskAsync("user/instagram", new TaskCreate { Path = "/hooks/post" });
```

**curl**

```bash
curl -X PUT https://api.pushqueue.dev/v1/queues/user%2Finstagram \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{"target": {"base_url": "https://api.example.com"}}'

curl -X POST https://api.pushqueue.dev/v1/queues/user%2Finstagram/tasks \
  -H "Authorization: Bearer $PUSHQ_API_KEY" \
  -d '{"path": "/hooks/post"}'
```

If you send the `/` unencoded, the API answers `404` with a hint to URL-encode the name. In query strings such as `name_prefix=user/`, no encoding is needed.

:::caution
If you self-host pushq behind a reverse proxy, the proxy must forward `%2F` unchanged. Caddy does by default. With nginx, use `proxy_pass http://127.0.0.1:8080;` with no URI part; a trailing `/` makes nginx decode `%2F` into `/`, and the request then fails with 404. See [deploying pushq behind a proxy](https://pushqueue.dev/docs/self-hosting/deploy/).
:::

Use folders to group many related queues, such as one queue per customer under `tenants/`, and to list or monitor them together with `name_prefix`.

## Queue stats and monitoring

`GET /v1/queues/{queue}/stats` returns live counts for a queue without listing its tasks. Add `id_prefix` to count only tasks whose ID starts with a prefix.


**TypeScript**

```ts
const stats = await pq.queueStats("emails", { idPrefix: "invoice-" });
```

**Python**

```python
stats = pq.queue_stats("emails", id_prefix="invoice-")
```

**Go**

```go
stats, err := pq.QueueStats(ctx, "emails", "invoice-")
```

**Java**

```java
QueueStats stats = pq.queueStats("emails", "invoice-");
```

**.NET**

```csharp
var stats = await pq.GetQueueStatsAsync("emails", idPrefix: "invoice-");
```

**curl**

```bash
curl "https://api.pushqueue.dev/v1/queues/emails/stats?id_prefix=invoice-" \
  -H "Authorization: Bearer $PUSHQ_API_KEY"
```

```json
{
  "state": "running",
  "pending": 12,
  "running": 3,
  "succeeded": 4810,
  "failed": 2,
  "scheduled_future": 140,
  "oldest_due_at": "2026-11-28T10:00:00Z",
  "oldest_due_age_seconds": 4.2,
  "dispatched_last_1m": 95,
  "errors_last_1m": 1,
  "dispatched_last_1h": 5120,
  "errors_last_1h": 30
}
```

| Field | Description |
|---|---|
| `state` | The queue's state: `running`, `paused` or `disabled`. |
| `pending` | Tasks that are due now or overdue and waiting to be dispatched, including retries whose time has come. |
| `running` | Tasks currently being delivered. |
| `succeeded` | Succeeded tasks still retained (24 hours by default on a self-hosted server). |
| `failed` | Failed tasks still retained (7 days by default on a self-hosted server). |
| `scheduled_future` | Pending tasks scheduled for later, including those waiting for a retry. |
| `oldest_due_at` | Schedule time of the oldest due task. Omitted when nothing is due. |
| `oldest_due_age_seconds` | How long that task has been waiting past its schedule time. A growing value means the queue is falling behind. |
| `dispatched_last_1m` / `dispatched_last_1h` | Delivery attempts started in the last minute / hour. |
| `errors_last_1m` / `errors_last_1h` | Of those attempts, how many did not get a 2xx response (non-2xx status, timeout or connection error). |
| `last_purge` | Time of the last purge. Omitted if the queue was never purged. |

Purged and deleted tasks are not counted. Use stats for dashboards and alerts: alert on `oldest_due_age_seconds` for lag and on `errors_last_1m` for a failing endpoint.

## Read more

- [Tasks, scheduling and deduplication](https://pushqueue.dev/docs/concepts/tasks/): what goes into a queue.
- [Rate limits and concurrency](https://pushqueue.dev/docs/guides/rate-limits/): choose `rate_limits` values.
- [Retry backoff and max attempts](https://pushqueue.dev/docs/concepts/retries/): how the `retry` settings play out.
- [Per-tenant queues](https://pushqueue.dev/docs/patterns/per-tenant-queues/): one queue per customer with folders.
- [Dead-letter queues](https://pushqueue.dev/docs/concepts/dead-letter-queues/): keep tasks that run out of retries.
