Skip to main content
Matrix42 Self-Service Help Center

Service Bus I: RabbitMQ

About this document

This document describes the first steps needed for successfully deploying RabbitMQ as a message broker. For a more in-depth guide on configuring the RabbitMQ Server, please refer to the official RabbitMQ manual. RabbitMQ will be deployed and thereafter used to transfer data between Empirum and Workspace Management.



Below, you can see an abstract overview of the way platforms are connected to RabbitMQ, enabling them to securely and remotely communicate with each other.


What is RabbitMQ?

RabbitMQ is a message-queueing software also known as a message broker or queue manager. Simply said; it is software where queues are defined, to which applications connect in order to transfer messages. RabbitMQ is particularly interesting for a on premise deployment of a message-queueing software, as it allows you to enjoy all the benefits of a fully-fledged message-queueing software, without the involvement of third-party services in the cloud.

Please also check the alternative Microsoft Azure Servcie Bus which is provided as a cloud service and does not require any local implementation.

When installing the RabbitMQ Server on the same server as Empirum make sure that the Matrix42 Empirum Service Bus Service is set for delayed startup.

RabbitMQ Firewall Settings

Firewall settings - which Ports are used by RabbitMQ
• 5672, 5671: used by the protocol AMQP 0-9-1 and 1.0 clients with and without TLS
• 15672: HTTP API clients, management UI and rabbitmqadmin (only if the management plugin is enabled)

RabbitMQ Installation Package content

The current RabbitMQ getting started package contains

  • Erlang OTP 22.1
    • TTP is a set of Erlang libraries and design principles providing middle ware to develop these systems. It includes its own distributed database, applications to interface towards other languages, debugging and release handling tools. It is a pre-requisite for the RabbitMQ server
  • RabbitMQ Server 3.8.3 for 64bit Windows system
  • Matrix42 CreateRabbitMqExchangeAndQueues.ps1 PowerShell script

Installation GuIde

This chapter contains a "step-by-step" guide for deploying the RabbitMQ message broker.

Automated Installation and configuration of RabbitMQ Server

The installation comes as self-extracting package (RabbitMQ_InstallPackage.exe). It automatically executes the PowerShell script Install-RabbitMqServer.ps1, which is part of the package. It allows an automated installation of the required components, please note that the installation will be placed in the default directories of the corresponding programs.
RabbitMQ_InstallPackage.exe After the automated installation, the RabbitMQ server will also be configured with default values for exchanging messages - except the username and its passwort (those will be asked during the script execution). In detail these parameters are

VirtualHost matrix42
ExchangeName matrix42.suem.topic
EmpirumQueueName matrix42.empirum.subscription
ServiceStoreQueueName matrix42.uux.subscription
SilverbackQueueSubscription matrix42.silverback.subscription

The default connection string based on this installation and configuration would look like this:

amqp://<username>:<password>@<FQDN of your RabbitMQ Server>/matrix42

If you want to install all components semi-automated, please extract the compressed file RabbitMQ_InstallPackage.exe, change the current directory to the package root and execute the script as shown below. You must execute the script as Administrator.


The script will install Erlang, RabbitMQ and the RabbitMQ Management Plugin.
After execution you can login to the management web UI of running RabbitMQ service on the localhost.


Login as user ‘guest’ with password ‘guest’ as default credential.

Don’t forget to change the guest password or disable the guest user entirely (latter is recommended). This user must only be used during installation from and to localhost (

If you prefer more control over the installation refer to next chapter of manual installation.
Otherwise skip the next chapter about manual installation of RabbitMQ server, and proceed with

Manual Installation of RabbitMQ Server

For a manual installation, please extract the compressed file.

Installation of Erlang OTP

RabbitMQ requires a 64-bit supported version of Erlang for Windows to be installed.
The provided getting started package contains a suitable Erlang OTP version for the provided RabbitMQ release.

Install Erlang silently from CMD
  • Run the provided installer with the following parameters from CMD otp_win64_22.1.exe /S
  • This will install the Erlang OTP in its default location C:\Program Files\erl10.5
  • Optionally it is possible to define the installation directory as follows otp_win64_22.1.exe /S /D=
  • The /D parameter expects a path to which Erlang OTP should be deployed
  • For the Step by Step guide we will assume you used the default settings
  • Once Erlang is installed, we need to set Erlang home directory as a variable in your environment so the RabbitMQ installation can find it Set ERLANG_HOME=C:\Program Files\erl10.5

Attention: Don’t forget to change the guest password or disable the guest user entirely (latter is recommended). This user must only be used during installation from and to localhost (

Install of Erlang OTP using the installer
  • Start the provided Erlang OTP installer
  • Click next
  • Click next
  • Optionally: define a Destination Folder of choice
  • Click install and confirm after installation
  • Once Erlang is installed, we need to set Erlang home directory as a variable in your environment so the RabbitMQ installation can find it Set ERLANG_HOME=C:\Program Files\erl10.5

Installation of RabbitMQ Server

Install RabbitMQ silently from CMD

Run the provided installer with the following parameters from CMD
rabbitmq-server-3.8.0.exe /S
This will install RabbitMQ server by default to: C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.0
It installs RabbitMQ as a Windows service and starts it using the default configuration.
set RABBITMQ_BASE="C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.0"

Enable RabbitMQ Management Plugin

Find your RabbitMQ installation and execute rabbitmq-plugins.bat
Start a CMD and change directory to: C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.0\sbin\
Execute rabbitmq-plugins.bat with the following parameters: rabbitmq-plugins.bat enable rabbitmq_management
This will install the necessary management plugins of RabbitMQ.
Check the services running on the machine you installed RabbitMQ to.
Start RabbitMQ Service if not already running.
After RabbitMQ server service has been installed and it is running. Start the RabbitMQ service by executing rabbitmq-service.bat with the parameter start.
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.0\sbin\rabbitmq-service.bat start
Check the Management (Web) Console.
Once the Management Console is available it can be accessed via a web browser at: http://localhost:15672
Use a web browser of choice and navigate to: http://localhost:15672
Login as user ‘guest’ with password ‘guest’ as default credential.

Install OpenSSL (optional)

If you’re planning to use SSL, use the latest OpenSSL available.
Following is a rough sketch of providing RabbitMQ the necessary SSL files
Create a directory within your RabbitMQ installation directory mkdir C:\Program Files\RabbitMQ Server\ssl
Change to the created directory cd C:\Program Files\RabbitMQ Server\ssl
Extract files from your Open SSL source to the SSL directory.
Please proceed with the configuration of your TLS support in RabbitMQ as described in the official RabbitMQ manual.

Create Exchange and Queues

Use the PowerShell Script (Matrix42) ‘CreateRabbitMqExchangeAndQueues.ps1’ as administrator to create a Topic Exchange and two queues bound to it in your new RabbitMQ system - if you have not yet configured it by the automated installation and configuration.

-ManagerUrl "http://localhost:15672" 
-VirtualHost "matrix42" 
-ExchangeName "matrix42.uem" 
-EmpirumQueueName "matrix42.empirum.subscription" 
-ServiceStoreQueueName "matrix42.uem.subscription"

Don’t forget to change the guest password or disable the guest user entirely (latter is recommended). This user must only be used during installation from and to localhost (

ManagerURL The URL address of the RabbitMQ manager interface
VirtualHost RabbitMQ is multi-tenant system: connections, exchanges, queues, bindings, user permissions, policies and some other things belong to virtual hosts, logical groups of entities. A virtual host has a name. When an AMQP 0-9-1 client connects to RabbitMQ, it specifies a vhost name to connect to. This name is required by the script to operate correctly. In our example above we used the VirtualHost "matrix42".
ExchangeName Also known as Topics, Exchanges are message routing agents, defined by the virtual host within RabbitMQ. An exchange is responsible for routing the messages to different queues. In our example above we used the ExchangeName "matrix42.uem."
EmpirumQueueName EmpirumQueueName is the Queue used by your Matrix42 Empirum ServiceBus Service to publish messages.
ServiceStoreQueueName ServiceStoreQueueName is the Queue used by your UEM Console Backend to receive messages

A username and password for accessing the RabbitMQ system will be created by the powershell script based on your given input.

Allowed Characters

User and Password and Virtual Host must be URL encoded strings/Percentage Escape.

The "amqp" URI scheme

The syntax of an AMQP 0-9-1 URI is defined by the following ABNF rules. All names in these rules not defined here are taken from RFC3986.

amqp_URI       = "amqp://" amqp_authority [ "/" vhost ] [ "?" query ]

amqp_authority = [ amqp_userinfo "@" ] host [ ":" port ]

amqp_userinfo  = username [ ":" password ]

username       = *( unreserved / pct-encoded / sub-delims )

password       = *( unreserved / pct-encoded / sub-delims )

vhost          = segment

Once a URI has been successfully parsed according to this syntax, the connection parameters are determined as described in the following sections.

. Vhost

The vhost component is used as the basis for the virtual-host field of the AMQP 0-9-1 method. Any percent-encoded octets in the vhost should be decoded before the it is passed to the server.

Note that:

  • The vhost component of the URI does not include the leading "/" character from the path. This makes it possible to refer to any vhost, not only those that begin with a "/" character.
  • The vhost is a single segment. Therefore, any "/" characters that appear in the vhost name must be percent-encoded. URIs with multi-segment paths do not obey this specification.

The vhost component may be absent; this is indicated by the lack of a "/" character following the amqp_authority. An absent vhost component is not equivalent to an empty (i.e. zero-length) vhost name.


  1. Question: I created a queue that needs to be removed, how to delete the queue?
    1. A queue can be deleted from the RabbitMQ Management Interface. Go to the queue tab and go to the bottom of the page. You will find a dropdown "Delete / Purge". Press Delete on the left side of the interface to delete the queue.
  2. Are messages persistent and survive a Server/RabbitMQ Service Restart?
    1. By default the messages are processed and removed. The default queue setting is non persistant and restarting the service will remove all unprocessed messages.
  3. For other possible ways of deleting queues you can consult the official RabbitMQ documentation.
  • Was this article helpful?