drift Docs
Start
What is Drift?
The tour, if you are new here.
Use cases
Whether Drift does your thing.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, four unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.
Troubleshooting
Error codes
What went wrong, and what to do about it.
Legal
Acceptable use
What a slice may not be used for.
Data processing
The DPA, and every sub-processor.

Queues

drift.Backbone.Queue(name): FIFO message queues.

Signatures

Go
// Pop takes the next message destructively
Push(body any) error   ·   Pop() (json.RawMessage, error)

A message body must be a JSON object. A bare string, number or array is rejected with 400 queue and body required, and a push past the queue's depth answers 429.

Push-based or pull-based, not both

Pop is the pull consumer, for a function that drains a queue on its own schedule. The push path is a function the Driftfile names queue:<name>, which the platform invokes once per message. Use one or the other on a given queue.

A worker receives the inner body, not the envelope.

A queue-triggered function is handed the payload, not the {id, body, timestamp} envelope that Pop and the CLI's peek return. Read your own fields straight off the payload.

A failed invocation is requeued with a retry counter; after three attempts the message moves to <queue>-dlq, an ordinary queue you can drain like any other. The Atomic guide has the poll interval and what counts as a failure.