ackee
Docs/Ackee Script

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 1
​
project "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

CloudBecomes
AWSAn SQS queue, fed by an SNS topic.
Google CloudA Pub/Sub topic and its subscription.
AzureA 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_…:

CloudVariables
AWS_URL, _TOPIC, _REGION
Google Cloud_TOPIC, _SUBSCRIPTION
Azure_HOST, _QUEUE

Notes

  • Publishing and consuming need connect iam from each side to the queue as well as env.
  • Retention, delivery attempts and ordering differ between clouds and are not portable: declare the queue with node to set them.