queue
Work handed from one part of an application to another.
A queue for work handed from one part of an application to another: one side publishes, another consumes, and a message survives until it is handled.
ackee.ack
ackee 1project "shop" {cloud = "gcp"region = "us-east1"gcpProject = "acme-shop"}service "api" {image = "us-docker.pkg.dev/cloudrun/container/hello"public = true}worker "fulfilment" {image = "us-docker.pkg.dev/cloudrun/container/hello"}queue "orders" {}connect env "api" -> "orders"connect iam "api" -> "orders"connect env "fulfilment" -> "orders"connect iam "fulfilment" -> "orders"
Fields
None. The name is all that means the same thing on every cloud; write queue "name" {}.
Any other field is refused (AK204), and the error names the exact type to declare with node for the setting you wanted.
What it becomes
| Cloud | Becomes |
|---|---|
| AWS | An SQS queue, fed by an SNS topic. |
| Google Cloud | A Pub/Sub topic and its subscription. |
| Azure | A Service Bus queue. |
Joins the shared network net: Azure only.
What a connection hands over
An env connection to a queue gives the consumer these variables, each prefixed by the queue's name in upper case — queue "orders" gives ORDERS_…:
| Cloud | Variables |
|---|---|
| AWS | _URL, _TOPIC, _REGION |
| Google Cloud | _TOPIC, _SUBSCRIPTION |
| Azure | _HOST, _QUEUE |
Notes
- Publishing and consuming need
connect iamfrom each side to the queue as well asenv. - Retention, delivery attempts and ordering differ between clouds and are not portable: declare the queue with
nodeto set them.