Goal
Know the limits before you design around a queue, and what each error means.Prerequisites
- A queue
Workflow
1
Check message and batch sizes against the limits below.
2
Handle 429 and 507 in your sender with backoff.
3
Handle 409 queue_delivery_paused in pull workers by waiting.
Limits
- Message size: 128 KB.
- Batch send: 100 messages and 256 KB in total.
- Delay: up to 86,400 seconds (24 hours).
- Retention: 1 hour to 14 days, default 4 days.
- Backlog: 25 GB per queue.
- Throughput: 5,000 messages a second per queue.
- Pull batch: up to 100 messages. Visibility timeout: up to 12 hours.
- Max retries: up to 100.
- Consumer concurrency: auto, or 1 to 250 batches in flight.
Error codes
- 413 message_too_large: a message is over 128 KB.
- 429 queue_rate_limited: more than 5,000 messages a second on this queue. Retry with backoff.
- 507 queue_full: the backlog reached 25 GB. Drain or purge the queue.
- 409 queue_name_ambiguous: the queue name exists in more than one of your projects. Pass the queue id or <project_id>:<name>.
- 409 queue_delivery_paused: a pull on a paused queue.
- A pull token used on another queue, or for anything other than pull and ack, is refused.
Expected result
Your senders and workers handle every limit error without losing messages.
Related guides
Send messages
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.
Pull consumers
A worker anywhere pulls a batch over HTTP, leases the messages for a visibility timeout, then acks or retries each one by lease id.
Pricing
Queues are billed by operations: each 64 KB written, read or deleted.