Skip to main content
Live. This area is documented as current, user-reliable behavior.

Goal

Recover failed messages and control delivery while you fix a consumer.

Prerequisites

  • A queue with a dead-letter queue for redrive

Workflow

1
Open the queue and choose Dead letters.
2
Read the error groups to see what failed and how often.
3
Fix the consumer.
4
Redrive the group, selected messages, or all of them back to the source queue.

Dead-letter queues

  • When you create a queue, choose new (StackShift makes one for you), existing (pick a queue in the project) or none.
  • A dead-letter queue is a queue with role dead_letter and dead_letter_for pointing at its source. It has its own retention.
  • Without one, a message that runs out of retries is deleted.
  • GET /queues/{queue}/dead-letters/groups on the dead-letter queue lists errors with a count, first and last time, and the message ids.

Redrive

  • POST /queues/{queue}/redrive on the dead-letter queue with {“message_ids”: […]} or {“all”: true}. The reply says how many were redriven.
  • A redriven message keeps its id and body. Its attempts reset to 0 and its retention starts again.
  • DELETE /queues/{queue}/messages with {“message_ids”: […]} removes messages you do not want to redrive.
  • From the CLI: stackshift queues redrive orders-dlq —all, or —message msg_a1B2c3D4e5F6 (repeatable) for chosen messages.

Pause and resume

  • Pause stops delivery. Messages are still accepted and still expire at the end of retention.
  • While paused, Function and HTTPS push consumers get nothing, and pulls return 409 queue_delivery_paused.
  • The queue shows Paused with who paused it and when. Resume to start delivery again.
  • POST /queues/{queue}/pause and /resume, or stackshift queues pause QUEUE and stackshift queues resume QUEUE.

Purge

Purge deletes every message on the queue and cannot be undone. Type the queue name to confirm, in the dashboard, the API or the CLI.
Purge

Expected result

Redriven messages leave the dead-letter queue and are delivered again by the source queue’s consumer.

Common failures

  • Redrive has nothing to send back to: redrive only works on a dead-letter queue, and sends messages to the queue it serves.
  • Purge or delete is refused: the confirm name must match the queue name exactly.

Batching, retries and delays

How batch size and wait, retries, retry delays, concurrency and delivery guarantees work.

Limits and error codes

Sizes, rates, retention and the error codes the Queues API returns when a limit is reached.

Queues API

Every Queues endpoint under /api/v1/queues, with request and reply shapes.