Configure RabbitMQ on TurboStack

Enable RabbitMQ per application, configure broker plugins, and secure remote connections with TLS and client certificates in Source (YAML).

Enable RabbitMQ for an application and, where needed, tune the broker version and plugins at the host level.

The RabbitMQ panel under Configure application > Technologies, enabled, with the note that a vhost is configured automatically and the pointer to Advanced > RabbitMQ Options
The RabbitMQ panel under Configure application > Technologies, enabled, with the note that a vhost is configured automatically and the pointer to Advanced > RabbitMQ Options

Where to configure it

RabbitMQ is enabled per application. Open the application, go to Configure application > Technologies > RabbitMQ, and turn it on.

Broker-level options live with the host. Open the host and go to the Advanced > RabbitMQ Options tab to set any plugins. The RabbitMQ version (rabbitmq_version) is not a field there - set it via the Source (YAML) view.

YAML configuration

Required

Key Meaning
rabbitmq_enabled Enables RabbitMQ for the application (true).

Optional

There are no optional YAML keys for the application. Select rabbitmq_plugins under host Advanced > RabbitMQ Options. Set rabbitmq_version and the TLS settings in the host's Source (YAML) view.

The management interface is always enabled, so you never have to add it to the list yourself. Removing a plugin from rabbitmq_plugins does not disable a previously enabled plugin. Ask Support if you need a plugin disabled.

# Per-application application configuration
rabbitmq_enabled: true

Connect your application

Enabling RabbitMQ on an application creates two things for its system user:

  • a virtual host named after the system user (prod), or <user>_<app> for a second application under the same user (prod_shop);

  • a RabbitMQ user with the same name as the system user, with full rights on that virtual host and on nothing else.

Both are on the host's Credentials tab under the system user, as RabbitMQ vhost, RabbitMQ user and RabbitMQ password. The same values are written to ~/.rabbitmq.yml in the system user's home directory, readable by that user only. A deploy script can read them there, so you do not have to store a copy elsewhere.

For an application on the same server, use this Advanced Message Queuing Protocol (AMQP) connection string:

amqp://<user>:<password>@localhost:5672/<vhost>

Encrypted connections

Transport Layer Security (TLS) encrypts connections from applications on other servers to RabbitMQ. These settings are host-level and apply to every application using the broker. Configure them in Source (YAML), outside system_users, then publish the host.

TLS is off by default. To supply your own certificate, set:

rabbitmq_server_tls_enabled: true
rabbitmq_server_tls_cert_type: custom
rabbitmq_server_tls_cert_fullchain: |
  <PEM certificate chain>
rabbitmq_server_tls_cert_pvk: |
  <matching PEM private key>

Replace both placeholders with your certificate material in Privacy Enhanced Mail (PEM) format. The certificate must cover every hostname clients use to reach the broker. Publishing fails if the key and certificate do not match. You manage expiry and renewal for a supplied certificate. Publish its replacement before it expires. Updating certificate material restarts the broker, so plan for clients to reconnect.

For a generated self-signed certificate, use rabbitmq_server_tls_cert_type: selfsigned instead. It uses the server's hostname. Clients must explicitly trust that certificate; keep certificate verification enabled.

Remote clients use the amqps:// connection scheme:

amqps://<user>:<password>@web1.example.com:5671/<vhost>

Clients must support TLS 1.3. Confirm that the Firewall allows the required remote connections.

Client certificates

Mutual TLS also verifies a certificate presented by the client. Set these host-level keys after configuring server TLS:

Key Meaning
rabbitmq_client_cert_auth_enabled Enable client certificate verification. Default false. Requires server TLS and the CA certificate below.
rabbitmq_client_cert_ca Public certificate authority (CA) certificates that sign your client certificates, in PEM format. Never supply the CA private key.
rabbitmq_client_cert_required With false (default), clients without a certificate can still use a username and password. With true, every TLS client must present a valid certificate.

These checks apply to encrypted AMQP on port 5671 and, when enabled, Message Queuing Telemetry Transport (MQTT) on port 8883. Requiring certificates also affects clients on port 5671 that authenticate with a username and password.

The rabbitmq_mqtt plugin enables MQTT. With client certificate authentication enabled, MQTT clients can log in using their certificate instead of a password. The certificate's common name must match an existing RabbitMQ user. If that user has several virtual hosts, ask Support to confirm the virtual host selection before connecting devices.

See the RabbitMQ TLS reference for all seven settings and their dependencies.

Open the management interface

The management interface is available on every host that runs the broker, at https://<your-host>/rabbitadm/. Two logins protect it:

  1. The browser asks for a login first. Use your system user and its password from the Credentials tab.

  2. RabbitMQ then shows its own login. Use the RabbitMQ user and RabbitMQ password from the same tab.

Your RabbitMQ user is not an administrator, so the interface shows your own virtual host only. Use it to read queue depth and consumer counts, and to follow message rates. To empty a queue that keeps growing, open Queues and streams, open the queue, then Purge.

From the shell, tscli rabbitmq queue list <vhost> lists the queues in your virtual host as JavaScript Object Notation (JSON), ready for use in scripts - see the TurboStack CLI.