A Queue delivers messages to a consumer Worker in your organization. Delivery is at-least-once and unordered, backed by Amazon SQS.
#Creating a Queue & Sending Messages
bash
skopik create_queue --name jobs --worker api
skopik send_message --queue jobs --body '{"task":"reindex"}'bash
curl -X POST https://api.platform.skopik.com/v1/queues \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"name": "jobs", "worker": "api", "alias": "production"}'
curl -X POST https://api.platform.skopik.com/v1/queues/jobs/messages \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"task": "reindex"}'json
{
"tool": "send_message",
"arguments": {
"queue": "jobs",
"body": "{\"task\":\"reindex\"}"
}
}#Consumer Delivery Contract
When a message is ready, the platform sends an HTTP request to your consumer Worker:
- Method & Path:
POST /_mh/queues/<queue>(orPOST <path>for crons declared in a rootskopik.json). - Headers:
x-mh-queue(x-skopik-queue),x-mh-message-id,x-mh-attempt, andx-mh-schedule(when triggered by a schedule). - Retries: A
2xxresponse within 30 seconds marks the message done. Any other status or timeout retries after 10, 20, 40, and 80 seconds. - Dead letters: After 5 failed attempts, the message moves to dead letters (
GET /v1/queues/{queue}/dead-lettersor MCPlist_dead_letters). - Payload size: 1 byte to 256 KiB per message, or up to 10 messages (256 KiB combined) via
POST /v1/queues/{queue}/messages/batch.
#Cron Schedules
Attach up to 10 five-field UTC cron schedules to any Queue (at most once per minute):
bash
skopik create_schedule \
--queue jobs \
--name nightly-report \
--cron "0 3 * * *" \
--body '{"report":"daily"}'If you deploy via Git Integration, you can also declare crons directly under a service in your root skopik.json, and the platform automatically creates and reconciles a <service>-cron Queue on production pushes.