Skip to content

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.

bash
skippr queue create-queue --queue-name image-jobs --input - <<JSON
{
  "attributes": {
    "MessageRetentionPeriod": "86400"
  }
}
JSON
hcl
resource "cloud_queue" "image_jobs" {
  queue_name        = "image-jobs"
  retention_seconds = 86400
}
ts
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,
});
python
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

NeedUseWhy
Hand a job to one competing consumerqueueVisibility timeout, long polling, receipt handles, and dead-letter redrive
Route one event to matching destinationseventsRules match event fields and fan out to queue or functions
Deliver work at a future or recurring timeschedulerUTC at(), rate(), and cron() triggers
Replay an ordered partitioned logstreamsIntended 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

OperationUse it to
CreateQueue / DeleteQueueCreate or remove a named queue
GetQueueUrlResolve a queue name to its canonical URL
ListQueuesList queues, optionally by queueNamePrefix
GetQueueAttributesRead retention and approximate queue depth
SetQueueAttributesSet retention, visibility, or redrive policy
PurgeQueueRemove every message without deleting the queue

Publish work

OperationUse it to
SendMessageAdd one message
SendMessageBatchAdd up to 10 messages and inspect per-entry failures

Process work

OperationUse it to
ReceiveMessageReceive up to the requested count, optionally with a long poll
DeleteMessage / DeleteMessageBatchAcknowledge completed work using receipt handles
ChangeMessageVisibility / ChangeMessageVisibilityBatchExtend or replace the visibility window while work continues

Limits and delivery contract

ContractValue
DeliveryAt least once
OrderingBest effort; FIFO queues are rejected
Message retentionMaximum 7 days
Long poll0–20 seconds
Default visibility timeout30 seconds
Message bodyMaximum 256 KiB
Batch sendMaximum 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 statusMeaning
AWS.SimpleQueueService.NonExistentQueueThe queue URL does not exist
QueueAlreadyExistsCreateQueue on an existing name always fails. It is not idempotent.
ReceiptHandleIsInvalidThe receipt handle is missing, stale, or invalid
InvalidParameterValueInvalid retention, FIFO settings, or request fields
InvalidActionUnknown CloudQueue.* target
401 / 403Missing authentication or a policy denial