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:
| Limit | Value |
|---|---|
| Max message size | 64 KiB |
| Max batch size | 10 messages per receive() |
| Lease duration | 30 seconds |
| Payload types | JSON or UTF-8 text |
| Queue triggers per worker | 1 |
Platform Details
AWS (SQS)
- Standard queues (not FIFO). At-least-once, best-effort ordering.
- Native limit: 256 KB (Alien enforces 64 KiB).
- Worker trigger visibility timeout:
max(30s, min(12h, worker_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.
Kubernetes / On-Prem
Queue is not provisioned by Alien on Kubernetes. The cluster operator provides the backing service (SQS, Kafka, Redis Streams) and configures it via Helm values.
The guarantees above (delivery, durability, retention) depend entirely on the backing service. Alien enforces the limits (message size, batch size) regardless of platform.
Queue triggers are not currently supported on Kubernetes. Use receive() polling instead.
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
| Platform | Queue Triggers |
|---|---|
| AWS | SQS event source mapping on Lambda |
| GCP | Pub/Sub push subscription to Cloud Run |
| Azure | Service Bus trigger via KEDA |
| Kubernetes / On-Prem | Not currently supported |
| 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 worker 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.