Huck Queue API
queue.rust.solutions is a small durable job queue with visibility-timeout semantics. All routes except GET /healthz require Authorization: Bearer <token>.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /healthz | Liveness check, no auth |
| POST | /q/{queue}/jobs | Enqueue {"payload": "..."} |
| POST | /q/{queue}/dequeue | Claim oldest pending job (60 s lease) |
| POST | /q/{queue}/jobs/{id}/ack | Acknowledge and remove a claimed job |
| GET | /q/{queue}/stats | Pending/inflight counts |
Queue names match [A-Za-z0-9._-]{1,64}, payloads are strings up to 64 KiB. Jobs whose lease expires without an ack return to the pending list automatically. State persists to disk on every mutation.
Example
curl -X POST https://queue.rust.solutions/q/emails/jobs \
-H "Authorization: Bearer $HUCK_TOKEN" -H "Content-Type: application/json" \
-d '{"payload": "send-welcome:user42"}'
{"id":1,"queued":1770000000}
curl -X POST https://queue.rust.solutions/q/emails/dequeue \
-H "Authorization: Bearer $HUCK_TOKEN"
{"id":1,"payload":"send-welcome:user42","inflight_until":1770000060}