Docs

Behavior & Limits

Guarantees, limits, and platform-specific behavior for Alien Queue.

Guarantees

On cloud platforms (AWS, GCP, Azure), Alien provisions and manages the queue backing service. These guarantees apply:

At-Least-Once Delivery. Every message is delivered at least once. Messages may be delivered more than once — your handler must be idempotent.

No Ordering. Messages may arrive in any order. Implement sequence numbers at the application layer if ordering matters.

30-Second Lease. Received messages are invisible to other consumers for 30 seconds. Unacknowledged messages become visible again after the lease expires.

Ack Idempotency. Acknowledging the same message twice is a safe no-op.

Durability. Messages are persisted by the cloud provider and survive infrastructure failures.

Limits

These are enforced by Alien on all platforms:

LimitValue
Max message size64 KiB
Max batch size10 messages per receive()
Lease duration30 seconds
Payload typesJSON or UTF-8 text
Queue triggers per function1

Platform Details

AWS (SQS)

  • Standard queues (not FIFO). At-least-once, best-effort ordering.
  • Native limit: 256 KB (Alien enforces 64 KiB).
  • Function trigger visibility timeout: max(30s, min(12h, function_timeout × 6)).
  • Retention: up to 14 days (default: 4 days).
  • receive() uses 20-second long polling.

GCP (Pub/Sub)

  • Topic + Subscription model. Pull-based.
  • Native limit: 10 MB (Alien enforces 64 KiB).
  • Retention: up to 31 days (default: 7 days).

Azure (Service Bus)

  • Queue-based. Standard or Premium tier.
  • Native limit: 256 KB Standard, 100 MB Premium.
  • Lock duration: up to 5 minutes.

Local

  • Backed by sled. Messages persist across restarts.
  • FIFO ordering — messages delivered in exact send order. Cloud platforms do not guarantee this; do not rely on ordering in production code.
  • Expired leases reclaimed lazily on next receive().
  • Triggers supported via LocalTriggerService.

Triggers

PlatformQueue Triggers
AWSSQS event source mapping on Lambda
GCPPub/Sub push subscription to Cloud Run
AzureService Bus trigger via KEDA

| Local | LocalTriggerService |

Design Decisions

64 KiB message limit. SQS supports 256 KB and Pub/Sub 10 MB. Alien enforces 64 KiB for portability. Store large payloads in Storage and pass a reference.

Fixed 30-second lease. Configurable timeouts would expose backend-specific behavior. A fixed window keeps behavior predictable. For function triggers, Alien auto-calculates an appropriate visibility timeout.

No exactly-once. Some backends support it in specific configurations, but the guarantees aren't portable. Alien documents at-least-once and encourages idempotent handlers.

On this page