> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Queues overview

> A Queue holds messages. One part of your app sends them; a consumer takes them off in batches and acks or retries each one.

> [!TIP]
>
> **Live.** This area is documented as current, user-reliable behavior.

## Goal

Understand what a Queue is, how it differs from Durable Jobs, and which one to use.

## Prerequisites

* A StackShift project. Every queue belongs to a project and is visible to the team through it.

## Workflow

**Step 1**

Open Queues from the product switcher.

**Step 2**

Create a queue in a project and choose a consumer: a Function, an HTTPS endpoint, or pull.

**Step 3**

Send messages from your code, the CLI or the API.

**Step 4**

Watch backlog, oldest message age, in and out rates and failures on the queue page.

**Step 5**

Inspect messages that ran out of retries in the dead-letter queue and redrive them when fixed.

## What a Queue is

A message is a piece of data: JSON, text or bytes. It has no code attached. Your consumer decides what to do with it.

StackShift stores each message until a consumer acks it, it runs out of retries, or its retention ends. Delivery is at least once and ordering is best effort, so make your consumer safe to run twice for the same message id.

## Queues and Durable Jobs

* Unit: a Queue holds messages. Durable Jobs runs a named job, with steps, sleeps, waits for events and saved state.
* Who decides what runs: with Queues, your consumer (a Function, a worker process, an HTTPS endpoint, or anything that pulls over HTTP). With Durable Jobs, StackShift calls the job handler URL for each run.
* Pick Queues to pass work between services, buffer bursts, fan in events, or replace a Redis-backed queue such as BullMQ, Sidekiq or a Laravel queue without running the broker yourself.
* Pick Durable Jobs when one piece of work has several steps that must not repeat, needs to pause for an external event, or must report a result per run.
* Durable Jobs has its own concurrency limits (the API names them durable\_queues). Those control job runs; they are not message queues.

## Consumers

* Function: StackShift calls a Function in your project with each batch.
* HTTPS push: StackShift POSTs each batch to your URL, signed with Ed25519.
* Pull: your worker asks for a batch over HTTP, works on it, then acks or retries each message by lease id.
* A queue has one consumer at a time. A queue without one keeps messages until retention ends and shows No consumer.

## The Queues area

* Queues list: each queue with backlog, oldest message age, in and out per minute and failures in the last 24 hours.
* Queue page: metrics charts, consumer settings, browse and preview messages without taking them, send a test message, dead letters with redrive, sources, pull tokens, pause and purge.
* Reading or previewing a message in the dashboard never leases it.

## Expected result

> [!TIP]
>
> You know whether your work is a message for a Queue or a job run for Durable Jobs.

## Related guides

> [card] [Create a queue](https://docs.stackshift.cloud/queues/create-a-queue.md)
>
> Create a queue from the dashboard, the CLI or the API, with its retention, default delay, accepted content types, consumer and dead-letter queue.

> [card] [Send messages](https://docs.stackshift.cloud/queues/send-messages.md)
>
> Send one message or a batch of up to 100 from the SDKs, the CLI or the API, as JSON, text or bytes, with an optional delay and idempotency key.

> [card] [Consumers and Function consumers](https://docs.stackshift.cloud/queues/consumers.md)
>
> Each queue has one consumer: a Function, an HTTPS endpoint, or pull. Function consumers are chosen in the dashboard or API, not in code.

> [card] [Durable Jobs overview](https://docs.stackshift.cloud/durable-jobs/overview.md)
>
> Durable Jobs is the reliable execution engine for backend work on StackShift. Deploy the app. Offload the work.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.