Message brokers#

General information#

Automated RabbitMQ service in NGN Cloud allows you to quickly deploy and configure a message broker.

RabbitMQ is a popular open source message broker. It serves as an intermediary in the message transmission between information system components. Thanks to the broker, they no longer need to monitor message delivery status, resend messages or wait for the transmission to complete, since the broker solves all these tasks. Thus, you can improve overall system performance by reducing the number of jobs done by other system components and time spent on their execution.

RabbitMQ offers rich functionality for customizing and optimizing the messaging process according to the system needs. For example, you can use different protocols to send and receive messages, set up routing rules, specify message handling priorities, and more.

Thanks to a lot of messaging protocols supported, RabbitMQ can be used in multi-protocol systems. In particular, it supports AMQP (Advanced Message Queuing Protocol), MQTT (Message Queuing Telemetry Transport), STOMP (Streaming Text Oriented Messaging Protocol), and XMPP (Extensible Messaging and Presence Protocol).

In addition, RabbitMQ features high degree of reliability and availability. Built-in replication and clustering mechanisms allow you to create message-intensive HA systems.

Before you begin#

To get started with the message broker service, follow these steps:

  1. Create a project, if you don’t have one.

  2. In the IAM section, create a user with the PaaS Administrator or Cloud Administrator role and add it to the project with the PaaS privilege.

  3. Make sure that the project has all the required resources – subnets, SSH keys, and security groups. Otherwise, create them.

  4. Read the recommendations on how to work with the service in the cloud.

Run RabbitMQ#

To launch the service, go to the Service Store or Installed Services section, select the RabbitMQ service in the Message brokers tab and click Create.

The service launch procedure comprises the following stages:

  1. Set the required network parameters for a RabbitMQ service:

    • VPC where the service will be deployed.

    • Security groups to filter traffic on the instance interface on which the RabbitMQ service will run.

    • The High-availability service option. If you select this option, then the service will be deployed in a three-node cluster.

    • Subnets where the message broker service will be deployed, or network interfaces through which cluster nodes will connect to subnets.

    Note

    To run a high-availability service in the selected VPC, create subnets or network interfaces in each availability zone first. In addition, these availability zones must support the same volume types.

    Note

    The ability to attach network interfaces may be useful, for example, when you need to recreate the cluster where the message broker has been deployed. If you delete a service, but do not delete attached network interfaces, you will be able to reuse them for connecting nodes of a new cluster to subnets, where the new cluster will be deployed. Thus, you can keep previous network settings, such as private IP addresses and security groups, rather than configure them again.

  2. Set the configuration of one or more instances on which the message broker service will run.

    Select the instance type and parameters of its volumes: type, size and IOPS (if available for a type).

    In addition, you can specify an SSH key. In this case, after automatic service configuration, you will have SSH access to the respective instances.

    Attention

    We provide the option to connect to instances using an SSH key while the new RabbitMQ service is beta testing. This feature may be disabled in the future.

  3. Set additional service parameters:

    • Service name – any unique name for the caching service.

    • Version.

    • Monitoring agent installation option. For centralized PaaS service monitoring, first deploy the Prometheus-based monitoring service. When selecting this option, also select the monitoring service you want to use. Both services must be in the same VPC. Optionally, you can set monitoring labels, which the installed monitoring agents will assign to collected metrics (for details, see about label usage).

    • Logging agent installation option – For centralized PaaS service logging, first create a logging service. Once a PaaS service is created, you will be able to install logging agents manually only.

      • Logging service – The selection of a logging service is only available when the Enable logging checkbox is checked.

      • Logging tags – Tags are assigned to logs when the latter are imported by the logging service. They simplify search for the required logs. Tags can only be set when the Enable logging checkbox is checked.

    • RabbitMQ user password. It can be set manually or generated automatically.

  4. Click Create.

    Note

    The service launching process usually takes 5 to 15 minutes.

Deleting a RabbitMQ service#

Deleting the RabbitMQ service deletes all instances and volumes created with it.

You can delete the service using one of the following methods.

  1. Go to the Installed Services section.

  2. Open the Message brokers tab.

  3. Find the service in the table and click on the icon .

  4. If you want to use network interfaces in the future, for example, to recreate a service on the cluster with the same network parameters, then, in the window that opens, disable the Delete associated network interfaces option.

  5. Confirm the action.

  1. Go to the Installed Services section.

  2. Open the Message brokers tab.

  3. Find the service in the table and go to the service page.

  4. Click :Delete in the Information tab.

  5. If you want to use network interfaces in the future, for example, to recreate a service on the cluster with the same network parameters, then, in the window that opens, disable the Delete associated network interfaces option.

  6. Confirm the action.