Configure RabbitMQ on TurboStack

Enable and configure RabbitMQ on TurboStack - turn on the broker per application and set the version and plugins at the host level.

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. RabbitMQ plugins (rabbitmq_plugins) are selected in the GUI under host Advanced > RabbitMQ Options; the version (rabbitmq_version) is set via 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 the list disables it again on the next deployment.

# 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.

The broker is reachable from the server itself; port 5672 is not open to the internet. Use this connection string in your application:

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

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.