Skip to main content
Version: Release 25.1

Manual Upgrade RabbitMQ

This guide explains how to manually upgrade RabbitMQ.

When you upgrade to Operator version 25.1, which uses RabbitMQ 4.x with quorum queues by default, you must perform manual steps if you're upgrading from an earlier version (such as 23.x) that used RabbitMQ 3.x and mirrored queues.

RabbitMQ server versions are not automatically upgraded during operator-to-operator or Helm-to-operator upgrades due to incompatible data formats and the need to enable feature flags. Manual steps are therefore required to enable RabbitMQ feature in each version. For more details, see Feature Flags — RabbitMQ.

Migration from RabbitMQ 3.x (Mirrored Queues) to 4.x (Quorum Queues)

Starting with Operator version 25.1, RabbitMQ 4.x and quorum queues are used by default. Quorum queues are designed for high availability and require at least three pods (nodes) to operate reliably.

To migrate from mirrored to quorum queues, use one of the following options.

Option 1: Reset the RabbitMQ Storage:

  1. Scale down the Release pods:

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"replicaCount": 0}}'
  2. Scale down RabbitMQ to 0:

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"rabbitmq": {"replicaCount": 0}}}'
  3. Perform the upgrade:

    xl kube upgrade
  4. Delete all RabbitMQ PVCs:

    kubectl delete pvc data-dai-xlr-rabbitmq-0 -n digitalai
    kubectl delete pvc data-dai-xlr-rabbitmq-1 -n digitalai
    kubectl delete pvc data-dai-xlr-rabbitmq-2 -n digitalai
  5. Scale RabbitMQ back up:

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"rabbitmq": {"replicaCount": 3}}}'
  6. Restore the Release pods:

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"replicaCount": 3}}'

Option 2: Recommendation from RabbitMQ

Manual Upgrade Between RabbitMQ 4.x Versions

If you're already using RabbitMQ 4.x with quorum queues and need to upgrade to a newer 4.x version (such as, from 4.0.x to 4.1.x), follow these steps:

  1. Scale down the Release pods:

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"replicaCount": 0}}'
  2. Enable all available feature flags:

    kubectl exec -n digitalai dai-xlr-rabbitmq-0 -c rabbitmq -- \
    rabbitmqctl list_feature_flags

    kubectl exec -n digitalai dai-xlr-rabbitmq-0 -c rabbitmq -- \
    rabbitmqctl enable_feature_flag all
  3. Patch the RabbitMQ image version (explicit or default):

    Option 1: Set a specific version

    Explicitly set the RabbitMQ image tag to a known version, for example 4.0.9.

    kubectl patch -n digitalai Digitalaireleases dai-xlr \
    --type=merge --patch '{"spec": {"rabbitmq": {"image": {"tag": "4.0.9"}}}}'

    Option 2: Remove the image tag to use the operator’s default (latest supported version).

    To move to the default version provided by the current operator, clear the image tag field:

    kubectl patch -n digitalai Digitalaireleases dai-xlr \
    --type=merge --patch '{"spec": {"rabbitmq": {"image": null}}}'
  4. Restore the Release pods to the replica count used before the upgrade (for example, 1):

    kubectl patch digitalaireleases.xlr.digital.ai dai-xlr -n digitalai \
    --type=merge \
    --patch '{"spec": {"replicaCount": 1}}'

    Adjust the value 1 to match the original replica count used in your environment.