rust.solutions

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

MethodPathDescription
GET/healthzLiveness check, no auth
POST/q/{queue}/jobsEnqueue {"payload": "..."}
POST/q/{queue}/dequeueClaim oldest pending job (60 s lease)
POST/q/{queue}/jobs/{id}/ackAcknowledge and remove a claimed job
GET/q/{queue}/statsPending/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}