Skip to main content

Concepts — RabbitMQ

Architecture​

RabbitMQ on Hikube is a managed messaging service based on the AMQP protocol. Each cluster created from the Hikube console belongs to a project and consumes that project's quotas (CPU, memory, storage).


Terminology​

TermDescription
RabbitMQ ClusterManaged RabbitMQ instance, created and managed from the console (menu DB & Messaging → RabbitMQ).
AMQPAdvanced Message Queuing Protocol, the standard messaging protocol supported by RabbitMQ.
ExchangeEntry point for messages. Routes messages to queues through bindings.
QueueQueue that stores messages until a consumer processes them.
BindingRouting rule between an exchange and a queue (based on a routing key).
Quorum QueueQueue type that uses the Raft protocol to replicate messages across several nodes.
Virtual Host (vhost)Logical namespace that isolates exchanges, queues and permissions within the same cluster.
ConsumerApplication that reads and processes the messages of a queue.
PresetPredefined CPU/memory resource profile, chosen when the cluster is created.
ReplicasNumber of RabbitMQ nodes in the cluster. Determines the deployment mode.

Deployment modes​

The Number of replicas field of the wizard offers three values:

ValueLabel in the consoleMode
11 (Standalone)A single node. The data volume is replicated at the platform storage level.
33 (Max High Availability)3-node cluster. Message replication is handled by RabbitMQ (quorum queues).
55 (Ultra High Availability)5-node cluster, tolerating the loss of two nodes.
Mode set at creation

The mode (standalone or cluster) and the number of replicas cannot be changed after creation: the console displays "The mode cannot be changed after creation". To change mode, create a new cluster.


Message routing​

RabbitMQ uses a flexible routing model based on exchanges and bindings:

Exchange types​

TypeRouting
directExact routing key
topicPattern matching with wildcards (*, #)
fanoutBroadcast to all bound queues
headersRouting based on message headers

Exchanges, queues and bindings are created by your applications, with an AMQP client connected to the relevant vhost. The console manages the cluster, the vhosts and the users, not the AMQP objects themselves.


Quorum queues and high availability​

Quorum queues use the Raft protocol to replicate messages:

  1. A node is elected leader for each queue
  2. Messages are replicated to the followers before confirmation
  3. If the leader fails, a follower is automatically promoted
tip

Choose 3 (Max High Availability) or 5 (Ultra High Availability) replicas to guarantee the Raft quorum, and declare your critical queues as quorum queues (argument x-queue-type: quorum on the client side).


Virtual hosts​

Vhosts isolate resources within the same cluster:

  • Each vhost has its own exchanges, queues and permissions
  • A user can have a different right on each vhost
  • Useful to separate environments (production, staging) or applications on the same cluster

The creation wizard requires at least one vhost. More vhosts can be added later from the cluster page (Add a VHost button).


Users and rights​

Each RabbitMQ user receives a password generated by the platform, displayed only once at creation (or after a rotation). Their rights are defined per vhost:

Right in the consoleEffect
AdministratorRead, write and configure on the vhost
Read-onlyRead-only on the vhost
No accessThe user has no access to the vhost

A user can only have one right per vhost. Rights can be changed at any time with the Manage Access action.


Resource presets​

The Preset sets the CPU and memory resources of each node. Presets are the virtual machine sizes of the u1, s1 and m1 series: a preset has the same resources as the VM of the same name. The list displayed by the wizard is authoritative:

PresetCPUMemory
u1.medium14Gi
u1.large28Gi
u1.xlarge416Gi
u1.2xlarge832Gi
u1.4xlarge1664Gi
u1.8xlarge32128Gi
s1.small12Gi
s1.medium24Gi
s1.large48Gi
s1.xlarge816Gi
s1.2xlarge1632Gi
s1.4xlarge3264Gi
m1.large216Gi
m1.xlarge432Gi
m1.2xlarge864Gi
m1.4xlarge16128Gi
m1.8xlarge32256Gi

The preset cannot be changed after creation.

The wizard does not preselect any preset: choose one to continue. Each option shows its resources, for example “u1.medium — 1 CPU / 4Gi”. If the list cannot be loaded, the wizard displays “The preset list could not be loaded. Try again later or contact support.”

A cluster created with a former preset (nano, micro, small, medium, large, xlarge or 2xlarge) keeps it and runs as before: the Edit form shows it as is and saves it unchanged. Since the preset cannot be changed after creation, contact support for this change. If a cluster's resources were set outside its preset, the form says so with the mention “(override)”.


Limits​

ParameterValue
Cluster name3 to 16 characters: lowercase letters, digits and hyphens; starts with a letter, ends with a letter or a digit
Available versions4.2, 4.1, 4.0, 3.13; upgrade only after creation
Replicas1, 3 or 5 (set at creation)
Vhost nameLowercase letters, digits and hyphens; starts with a letter, ends with a letter or a digit
Username3 to 16 characters: lowercase letters, digits and hyphens; starts with a letter, ends with a letter or a digit. Some names, such as admin or root, are reserved
Disk size1 to 4096 GB per node, within the project's storage quota; increase only
External accessCan be enabled at creation or later
AMQP port5672, without TLS

Further reading​