v1

Databases And Persistence /

Deploy RabbitMQ on Northflank

This guide explains how to quickly and easily deploy and use RabbitMQ on Northflank.

Available versionsDescriptionBackupsTLS
3.10.7, 3.9.22RabbitMQ is a lightweight, easy to deploy, open-source message broker that supports multiple messaging protocols.DiskYes

Deploy RabbitMQ

  1. Choose addon from the create new menu in the top right corner of the dashboard

  2. Select RabbitMQ and enter a name

  3. Choose a version or leave as default (most recent version)

  4. Choose whether to deploy with TLS. This can be changed later.

  5. Choose whether to make RabbitMQ publicly accessible. This will give your addon a URL and make it available online. TLS must be enabled to select this.

  6. If you have secret groups in your project, choose ones to link to the addon so that RabbitMQ can be used in services and jobs that inherit variables from the secret group. To link RabbitMQ to a secret group:

    • Show secret groups and configure the secret groups you wish to use
    • Select suggested secrets from RabbitMQ to link, or select all
    • Set any required aliases for specific secrets to make them accessible by that name within your application
  7. Select the required resources for your RabbitMQ deployment. You can scale RabbitMQ after creation, but available storage and replicas cannot be decreased once increased.

  8. Create addon and RabbitMQ will begin provisioning, this may take a few minutes.

Connect to RabbitMQ

You can manually copy the connection secrets for RabbitMQ from the connection details page into runtime variables or build arguments of your workloads on Northflank.

However, it is much easier to link your storage's connection details to a new or existing secret group.

The necessary secrets to connect your workload will vary depending on your application and the protocols you are using.

To access the RabbitMQ management dashboard you can use the MANAGEMENT_ENDPOINT with the the USERNAME and PASSWORD secrets as credentials, which gives access to a management user . Using ADMIN_USERNAME and ADMIN_PASSWORD to log in to the management dashboard will allow access to administrator account .

You can access RabbitMQ using the AMQP connection string and AMQP port.

Available ports

PortTLS PortProtocolURL prefix
56725671AMQPampq[s]://
18838883MQTTmqtt[s]://
1567215671HTTPhttp[s]://

STOMP and Streams are disabled by default, contact support@northflank.com to request that they are enabled.

Automatically inherit RabbitMQ connection details into your workload

  1. Create a new secret group of runtime variables to connect in the running workload
  2. Show addons and configure your addon with either the AMQP_CONNECTION_STRING and AMQP_PORT, or other connection details and secrets as required
  3. Set the aliases required in your workload to access the secrets
  4. Enable apply secrets to specific services/jobs and select the workloads you want to access the database
  5. Create secret group
  6. Go to one of the workloads that inherits from the group and check the environment page, you should see the inherited variables from the secret group

The connection string or secrets will now be available in your workload under the configured aliases, and your application will be able to connect to RabbitMQ using them.

Access RabbitMQ

Access locally

To forward RabbitMQ for local access using the Northflank CLI, copy and execute the forward addon command from the local access section of the overview. You can then access the addon using the AMQP and MQTT connection strings.

Administration

You can use the RABBITMQ_ADMIN_CMD from the connection details page to access your RabbitMQ deployment using the command-line client.

Alternatively you can access the web interface via the MANAGEMENT_ENDPOINT link, logging in with the administrator credentials ADMIN_USERNAME and ADMIN_PASSWORD.

You can also access the addon using the AMQP and MQTT admin connection strings.

Access externally

To access your RabbitMQ deployment externally, ensure deploy with TLS and publicly accessible are enabled on the settings page under networking. The connection strings will be updated with the new configuration if TLS was previously disabled (otherwise they will remain the same, but publicly exposed).

RabbitMQ specifications

Maximum connections

The number of maximum connections for a virtual host or user can be configured under limits. Log in to the RabbitMQ management endpoint using the admin credentials, open the admin page and select limits to set and update limits.

Your addon will be able to handle more concurrent connections by increasing the available memory. You can do this by selecting the compute plan on the addon's resources page.

© 2022 Northflank Ltd. All rights reserved.