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

Goal

Tune delivery for your consumer and make it safe for repeats.

Prerequisites

  • A queue with a consumer

Workflow

1
Start with the defaults: batch size 10, batch wait 5 seconds, 3 retries, auto concurrency.
2
Raise batch size when each message is cheap; lower it when each is slow.
3
Set a retry delay that gives a failing dependency time to recover.
4
Cap concurrency if your consumer or a downstream service cannot take more parallel batches.

Batches

  • A batch is sent when it reaches batch size (1 to 100) or when batch wait runs out, whichever comes first.
  • Function and HTTPS push consumers get batches as they fill. Pull consumers set their own batch size per pull.

Retries

  • attempts counts deliveries, including the current one: the first delivery shows 1, and a message never delivered shows 0 in the message list.
  • Retry one message with a delay in the reply (push and Function) or in the ack call (pull). Without a delay, the consumer’s retry delay applies.
  • A failed batch (throw, non-2xx, timeout) retries every message in it.
  • max_retries counts retries after the first delivery, so max_retries 3 means up to 4 deliveries. After that (up to 100 retries) the message goes to the dead-letter queue, or is deleted when there is none.

Delays

  • A message sent with delay_seconds, or under a queue default delay, stays delayed until then. Delayed messages count in the backlog but are not delivered.
  • The longest delay is 86,400 seconds (24 hours).

Concurrency

  • Auto (0) adds batches in flight as the backlog grows and removes them as it drains.
  • A cap from 1 to 250 limits batches in flight. Use 1 when messages must be handled one batch at a time.
  • The queue page shows how many batches are running now.

Guarantees

  • At least once: a message can be delivered more than once, for example after a timeout. Use the message id, or your own business key, to skip repeats.
  • Ordering is best effort. Do not rely on messages arriving in the order they were sent.

Expected result

Messages flow at the pace your consumer can handle, and failures back off instead of hammering it.

Dead letters, redrive, pause and purge

Find messages that ran out of retries, group them by error, send them back once fixed, pause delivery, or purge a queue.

Consumers and Function consumers

Each queue has one consumer: a Function, an HTTPS endpoint, or pull. Function consumers are chosen in the dashboard or API, not in code.

Limits and error codes

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