Skip to content

Managed Messaging ​

Frostmoln runs managed LavinMQ message brokers — an AMQP 0-9-1 broker for work queues, pub/sub and event streams between your services. Instances are single-node; the platform provisions the VM, configures the broker, and gives you a connection. Inside an instance you manage vhosts, application users and their permissions as platform resources, from the portal, the fm CLI or Terraform.

Choosing a type and version ​

LavinMQ is the messaging type. The create dialog lists the launchable versions and marks the recommended one (Recommended); end-of-life and preview versions are hidden. Version statuses follow the same lifecycle as managed databases. From the CLI, fm messaging version list shows the same catalog.

Sizing ​

Instance sizes use the mq.gp1.<size> flavor family (small/medium/large/xlarge/2xlarge), each with a set amount of vCPU and RAM. fm messaging flavor list and the create dialog show the specs, and the create dialog shows the estimated cost before you confirm. Prices are on the price list.

Create an instance ​

In the portal, go to Messaging → Instances → Create Messaging Instance and choose the version, flavor, the VPC + subnet and a persistence mode (persistent, the default, or none).

Require TLS is on by default: the broker serves AMQPS (5671) and HTTPS management (15671) only, and the plaintext AMQP (5672) and HTTP management (15672) ports are closed. Turn it off (--require-tls=false in fm, require_tls = false in Terraform) only for clients that cannot use TLS; the instance then also serves plaintext beside TLS. The setting is fixed when the instance is created: to change it, create a new instance (in Terraform, changing require_tls replaces the instance; an API update that sends a different requireTls is refused with 400 REQUIRE_TLS_IMMUTABLE).

From the CLI ​

Lifecycle commands are type-specific (fm messaging lavinmq …); the cross-type fm messaging … group lists across types.

bash
fm messaging version list      # pick a version from the catalog
fm messaging lavinmq instance create \
  --name events \
  --type-version <version> \
  --flavor mq.gp1.small \
  --vpc <vpc-id> \
  --subnet <subnet-id> \
  --persistence-mode persistent

fm messaging instance list

With Terraform ​

hcl
resource "frostmoln_messaging_instance" "events" {
  name      = "events"
  type      = "lavinmq"
  flavor_id = "mq.gp1.small"
  vpc_id    = frostmoln_vpc.main.id
  subnet_id = frostmoln_subnet.main.id

  persistence_mode = "persistent"
}

Omit version to get the recommended version. The version is fixed for the life of an instance.

Connect ​

The instance has a private IP on the subnet you chose and is reachable from instances on the same VPC (or through fm forward). The create flow opens the ports the instance serves in its security group:

PortProtocol
5672AMQP 0-9-1, only on an instance created with Require TLS off
5671AMQPS (AMQP over TLS), on an instance that serves TLS
15672HTTP management UI and API (admin user only), only on an instance created with Require TLS off
15671HTTPS management UI and API (admin user only), on an instance that serves TLS

The instance detail page reveals the admin credentials behind Show Credentials (or with fm messaging lavinmq instance credentials <instance-id>). The admin user owns the default vhost / and is the only user that can sign in to the management UI. Use it to operate the broker, not to connect your applications: give each application its own user and vhost.

Connect over TLS ​

An instance with a certificate serves AMQPS on 5671 and the HTTPS management UI on 15671, with a certificate from the Frostmoln customer CA issued for the instance's hostname. The portal shows a TLS badge, the hostname and the Download CA bundle button; fm messaging lavinmq instance get and Terraform's tls_enabled and hostname attributes report the same.

The hostname has the form <label>.mq.<vpc-label>.<tenant-label>.<org-label>.fm.internal and resolves inside the instance's VPC. <label> is the instance's name at create, lowercased, with every run of characters other than a-z and 0-9 turned into one -, any - at the start or end removed, and cut to 63 characters; a rename does not change it.

The credentials (Show Credentials, fm … instance credentials) carry the connection URI and management URL built for you; use them as given:

text
# AMQPS, from an instance on the same VPC
amqps://<username>:<password>@<hostname>:5671/%2f

# Management UI
https://<hostname>:15671

Configure your client to trust the CA bundle and to verify the server's name:

  1. Download the bundle: the Download CA bundle button, fm pki ca-bundle --file frostmoln-customer-ca.pem, Terraform's frostmoln_ca_bundle data source, or the static copy at /pki/frostmoln-customer-ca.pem. Check its fingerprint as described in Verifying Frostmoln managed-service certificates.
  2. Set it as the CA file of the AMQP connection (for example cafile in Python's ssl.create_default_context, or ca in the Node.js amqplib socket options) and keep hostname verification on.
  3. Connect to the hostname. If you connect by address instead (the private IP, or a port forwarded with fm forward), still verify the certificate against the hostname (the server name / SNI setting of your client).

Application users connect the same way: fm messaging lavinmq user credentials and the portal show the hostname to verify against. With Require TLS they list only the AMQPS port.

With Require TLS (the default), these are the only endpoints: plaintext AMQP and HTTP management are closed, and the credentials, fm and Terraform list no plaintext port. The portal shows a TLS required badge, fm messaging lavinmq instance get shows TLS Required: Yes, and in Terraform require_tls is true and port / management_port are null. On an instance created with Require TLS off, plaintext AMQP (5672) and HTTP management (15672) are served beside TLS.

Instances without TLS ​

An instance without a certificate serves no TLS and gets none later: the portal shows TLS as Not enabled and offers Create an instance with TLS, which opens the create form with the same network, size and version. Require TLS starts on there, as for every new instance: turn it off only if your clients cannot use TLS. Its credentials carry an amqp:// URI and an http:// management URL on the private IP. Its traffic is not encrypted: connect only from instances in the same VPC, and never route it over the internet or a third-party network. To connect over AMQPS and HTTPS, create a new instance and move your applications to it.

An instance that requires TLS but has no certificate serves no endpoint at all: it is in status error, and its credentials list no port, URI or management URL. Delete it and create a new one.

Names are DNS names ​

Because the hostname is derived from the name, an instance name must contain at least one ASCII letter or digit (otherwise the create is refused as invalid), and its DNS label must be unique in the VPC, including labels still held by instances renamed since. A create with a taken label is refused with 409 INSTANCE_DNS_NAME_TAKEN and nothing is created: choose another name.

Keep the broker inside your VPC

The broker is not exposed to the internet. Keep it that way: reach it only from your own instances on the same VPC, store passwords in Secrets, and rotate the admin password from Show Credentials when needed.

Vhosts, users and permissions ​

A vhost is an isolated namespace of exchanges and queues. An application user is an AMQP login (it has no management UI access). A permission grants one user access to one vhost through three regexes: configure, write and read. A user can hold permissions on several vhosts.

Lifecycle ​

Every create, change and delete is applied inside the running broker by the platform, so it is asynchronous: the request is accepted at once and the object shows its progress in its status.

StatusMeaning
pendingAccepted; the broker has not confirmed it yet
readyThe broker holds the object
deletingBeing removed; the object disappears when the broker confirms
errorThe object is absent from the broker, or its state is unknown

pending becomes ready; deleting ends with the object gone. To follow a change, read the object again until its status settles; the portal, fm and Terraform do this for you.

An instance created before vhost and user management was available cannot manage them: every change answers 409 CAPABILITY_ABSENT, and retrying will not help.

When a change fails ​

A failed operation records a reason (a stable code) and a message in your language. There are two cases:

  • error — the object is absent or its state is unknown, typically a create that failed. Delete it, then create it again. Deleting an object the broker never received only removes the record.
  • ready with a failure reason — the last change failed and the broker is unchanged: the object keeps its previous state. This is what a failed permission change or a failed delete looks like. It is a failure, not a success, even though the status reads ready; correct the cause and retry.

Names ​

Vhost and user names are 1–64 characters of A-Z a-z 0-9 . _ -, starting with a letter or a digit, and unique per instance regardless of case. User names cannot be the instance admin, guest or __direct, and the default vhost / belongs to the admin and cannot be managed here. An instance holds at most 100 vhosts and 100 users.

Passwords ​

User passwords are generated by the platform; you never choose one. A create does not return the password: read it once the user is ready, in the portal, with fm messaging lavinmq user credentials, or from the Terraform resource's password attribute. Reading it earlier is refused because the broker does not hold the user yet. To get a new password, delete the user and create it again.

Treat the password as a secret: build the connection URL at runtime from a secret (an environment variable, or Secrets), never commit it or pass it on a command line, and redact it in logs. fm messaging lavinmq user credentials prints the password, so do not run it where output is logged (such as CI); pipe it into your secret store instead.

Permission regexes ​

Each of configure, write and read is a regex matched against exchange and queue names in the vhost, as in LavinMQ itself:

  • .* grants everything; ^orders\. grants only names starting with orders..
  • ^$ grants nothing — use it for a right the user should not have (for example a consumer that must not publish: write = "^$").
  • All three are required, at most 255 bytes each, and must not start with -.

The permission shows what the broker was last given: after a change, the new values appear only once it has been applied. A permission whose create failed shows the values it asked for.

Delete order ​

A vhost or a user that still has a permission cannot be deleted (409 OBJECT_IN_USE). Remove the permissions first, then the user or vhost. The vhost's permission list (portal, fm messaging lavinmq vhost permissions, or GET …/vhosts/{vhost}/permissions) shows every grant on it.

Deleting a user also closes every connection it has open to the broker.

Deleting a vhost deletes its messages

Deleting a vhost permanently removes every exchange, queue and message in it.

Objects you create by hand through the broker's own management UI or API are not shown here and are never touched by the platform.

Access control ​

Vhosts, users and permissions have their own IAM actions — messaging:vhosts:*, messaging:users:* and messaging:permissions:* — separate from the instance's. Reading a user's password is messaging:users:read on that user. A machine principal gets these grants from an attached access policy: the read/list operations to read the vhosts and users (passwords included), and the create/update/delete operations to make changes. Flat API-key scopes are retired (2026-10-21): a key issued before then keeps answering through its stored messaging:read / messaging:write scopes until it is migrated or cleared, but nothing mints a scoped key any more. See IAM Access Policies and API Key Scopes.

One operation at a time per instance ​

The platform applies operations on one instance one at a time. A large batch fired in parallel queues up, and operations that wait too long fail (the broker is unchanged; retry them). In practice:

  • Terraform — no need to lower -parallelism: the provider runs the vhost, user and permission operations of one instance one at a time on its own.
  • Scripts — run them one after another per instance rather than firing many in parallel. Operations on different instances can run in parallel.

In the portal ​

Open the instance and go to the Vhosts & users tab. Create vhosts and users, set a user's permission on a vhost, and reveal a user's password once it is ready.

From the CLI ​

bash
fm messaging lavinmq vhost create <instance-id> orders
fm messaging lavinmq user create <instance-id> orders-worker
fm messaging lavinmq vhost list <instance-id>
fm messaging lavinmq user list <instance-id>

# Once both are ready: let orders-worker consume, but not publish or declare
fm messaging lavinmq user permission set <instance-id> orders-worker orders \
  --configure '^$' --write '^$' --read '^orders\.'
fm messaging lavinmq user permission list <instance-id> orders-worker

fm messaging lavinmq user credentials <instance-id> orders-worker

# Delete order: list and remove the vhost's permissions, then the user and the vhost
fm messaging lavinmq vhost permissions <instance-id> orders
fm messaging lavinmq user permission delete <instance-id> orders-worker orders
fm messaging lavinmq user delete <instance-id> orders-worker
fm messaging lavinmq vhost delete <instance-id> orders

Names are positional. The commands wait until the change is applied and exit non-zero if it failed; --no-wait returns as soon as the change is accepted, and --wait-timeout (default 25m) bounds the wait. Because the commands wait, running them one after another already respects the one-operation-at-a-time rule.

The full command and flag list is in the fm CLI reference.

With Terraform ​

hcl
resource "frostmoln_messaging_vhost" "orders" {
  instance_id = frostmoln_messaging_instance.events.id
  name        = "orders"
}

resource "frostmoln_messaging_user" "orders_worker" {
  instance_id = frostmoln_messaging_instance.events.id
  name        = "orders-worker"
}

resource "frostmoln_messaging_permission" "orders_worker" {
  instance_id = frostmoln_messaging_instance.events.id
  user        = frostmoln_messaging_user.orders_worker.name
  vhost       = frostmoln_messaging_vhost.orders.name

  configure = "^$"
  write     = "^$"
  read      = "^orders\\."
}

output "orders_worker_password" {
  value     = frostmoln_messaging_user.orders_worker.password
  sensitive = true
}

Referencing the user and vhost from the permission lets Terraform create them first and destroy the permission first, so the delete order is handled for you.

Import existing objects with <instance_id>/<name> (vhost, user) and <instance_id>/<user>/<vhost> (permission), for example terraform import frostmoln_messaging_vhost.orders <instance_id>/orders. create_before_destroy is not supported on a permission.

The password is in your Terraform state

The generated password is stored in the Terraform state. Mark any output that carries it sensitive = true, and keep the state in an encrypted backend with restricted access.

Managing an instance ​

  • Resize storage — grow the data volume from the detail page (or with fm messaging lavinmq instance resize). Grow-only; changing the flavor (vCPU/RAM) is not yet available.
  • Restart — restart the broker from the detail page.
  • Rotate the admin password — from Show Credentials, or with fm messaging lavinmq instance credentials <instance-id> --rotate. Application users and their passwords are not affected. Vhost, user and permission changes are refused while an admin password rotation runs (409 ROTATION_IN_PROGRESS), and a rotation is refused while any of those changes is open (409 OPERATION_IN_PROGRESS); wait for it to finish and retry.

Limits ​

  • Single-node — no clustering or failover today.
  • Deleting an instance is permanent — its vhosts, users, permissions and messages go with it.
  • The version is fixed for the life of an instance — to change it, create a new instance on the desired version.