Queue
Queue hands a job to one worker at a time. Producers send messages; workers receive, do the work, then delete the message so it is not retried. Use this for background jobs, image processing, and other work that should not fan out to every subscriber. Messages are delivered at least once.
Status: Preview. See the API action reference for the full command list.
Before you start
- Sign in with
skippr login. See Cloud User Directory. - Ensure your policy allows the queue actions you need.
Create your first queue
This complete command uses the stored Cloud session. The same create is CLI, Terraform, CDKTF TypeScript, or CDKTF Python. For provider credentials and the shared cloud provider block, see Terraform and CDKTF.
skippr queue create-queue --queue-name image-jobs --input - <<JSON
{
"attributes": {
"MessageRetentionPeriod": "86400"
}
}
JSONresource "cloud_queue" "image_jobs" {
queue_name = "image-jobs"
retention_seconds = 86400
}import { CloudProvider, CloudQueue } from "@skippr/provider-cloud";
const cloud = new CloudProvider(this, "cloud", { region: "eu-central-1" });
new CloudQueue(this, "image-jobs", {
queueName: "image-jobs",
retentionSeconds: 86400,
provider: cloud,
});from skippr_cdktf import CloudProvider, CloudQueue
cloud = CloudProvider(self, "cloud", region="eu-central-1")
CloudQueue(
self,
"image-jobs",
queue_name="image-jobs",
retention_seconds=86400,
provider=cloud,
)The response contains queueUrl of the form https://queue.{region}.cloud.skippr.io/.... Pass that exact value to SendMessage, ReceiveMessage, DeleteMessage, and the other message operations. Mesh and loopback addresses are transport, not the queue identity.
Choose the right service
| Need | Use | Why |
|---|---|---|
| Hand a job to one competing consumer | queue | Visibility timeout, long polling, receipt handles, and dead-letter redrive |
| Route one event to matching destinations | events | Rules match event fields and fan out to queue or functions |
| Deliver work at a future or recurring time | scheduler | UTC at(), rate(), and cron() triggers |
| Replay an ordered partitioned log | streams | Intended for topics, offsets, and consumer groups; not shipping yet |
Queue is not FIFO in Preview. Standard queue order is best effort.
Operations by task
Create and manage queues
| Operation | Use it to |
|---|---|
CreateQueue / DeleteQueue | Create or remove a named queue |
GetQueueUrl | Resolve a queue name to its canonical URL |
ListQueues | List queues, optionally by queueNamePrefix |
GetQueueAttributes | Read retention and approximate queue depth |
SetQueueAttributes | Set retention, visibility, or redrive policy |
PurgeQueue | Remove every message without deleting the queue |
Publish work
| Operation | Use it to |
|---|---|
SendMessage | Add one message |
SendMessageBatch | Add up to 10 messages and inspect per-entry failures |
Process work
| Operation | Use it to |
|---|---|
ReceiveMessage | Receive up to the requested count, optionally with a long poll |
DeleteMessage / DeleteMessageBatch | Acknowledge completed work using receipt handles |
ChangeMessageVisibility / ChangeMessageVisibilityBatch | Extend or replace the visibility window while work continues |
Limits and delivery contract
| Contract | Value |
|---|---|
| Delivery | At least once |
| Ordering | Best effort; FIFO queues are rejected |
| Message retention | Maximum 7 days |
| Long poll | 0–20 seconds |
| Default visibility timeout | 30 seconds |
| Message body | Maximum 256 KiB |
| Batch send | Maximum 10 messages |
If a message is not deleted before its visibility timeout, another receive can return it. Design consumers to be idempotent. A configured redrive policy moves repeatedly received messages to a sibling dead-letter queue after maxReceiveCount.
Unsupported create or update attributes are reported in ignoredFields and may also appear in x-cloud-ignored; they are not silently applied.
Errors
Errors use a JSON code and message.
| Code or status | Meaning |
|---|---|
AWS.SimpleQueueService.NonExistentQueue | The queue URL does not exist |
QueueAlreadyExists | CreateQueue on an existing name always fails. It is not idempotent. |
ReceiptHandleIsInvalid | The receipt handle is missing, stale, or invalid |
InvalidParameterValue | Invalid retention, FIFO settings, or request fields |
InvalidAction | Unknown CloudQueue.* target |
401 / 403 | Missing authentication or a policy denial |
