Support for quorum queues has been added in Xray chart version 3.124.x. Currently, Xray uses RabbitMQ with mirrored classic queues. It is recommended to transition to quorum queues, as classic queue mirroring will be deprecated in RabbitMQ 4.x.
Important Notes (Applies to Both Xray and Platform Charts)
Irreversible Migration: Once you switch to quorum queues, rolling back to classic queues is not supported. We strongly recommend switching to quorum as they are the preferred and more reliable type for having a replicated queue in RabbitMQ 4.x
Replica Count: In quorum mode, a RabbitMQ
replicaCountof 3 is recommended for proper functioning and high availability.
Xray Charts
Note
From version 3.124.x
Fresh Installation
Apply the following configuration to enable quorum queues during a fresh install.
rabbitmq:
replicaCount: 3
podManagementPolicy: Parallel
global:
xray:
rabbitmq:
replicaCount: 3
haQuorum:
enabled: trueUpgrade from Classic to Quorum Queues
Apply the following configuration to upgrade from classic queues to quorum queues:
rabbitmq:
replicaCount: 3
podManagementPolicy: Parallel
extraPlugins: "rabbitmq_shovel rabbitmq_shovel_management"
migration:
deleteStatefulSetToAllowFieldUpdate:
enabled: true
removeHaPolicyOnMigrationToHaQuorum:
enabled: true
global:
xray:
rabbitmq:
replicaCount: 3
haQuorum:
enabled: true
migrateMessagesFromXrayDefaultVhost: truePlatform Charts
Note
From version 11.2.0
Fresh Installation
Apply the following configuration to enable quorum queues during a fresh install:
rabbitmq:
replicaCount: 3
podManagementPolicy: Parallel
global:
xray:
rabbitmq:
replicaCount: 3
haQuorum:
enabled: trueUpgrade from Classic to Quorum Queues
Apply the following configuration to upgrade from classic queues to quorum queues:
rabbitmq:
replicaCount: 3
podManagementPolicy: Parallel
extraPlugins: "rabbitmq_shovel rabbitmq_shovel_management"
migration:
deleteStatefulSetToAllowFieldUpdate:
enabled: true
removeHaPolicyOnMigrationToHaQuorum:
enabled: true
global:
xray:
rabbitmq:
replicaCount: 3
haQuorum:
enabled: true
migrateMessagesFromXrayDefaultVhost: trueSwitch to RabbitMQ 4.x
Note
Switching to RabbitMQ 4.x requires quorum queues to be enabled in the existing deployment. First, switch to quorum queues, and then upgrade to RabbitMQ 4 in a two-stage process.
Xray charts
Override the below tag in values.yaml
rabbitmq:
image:
tag: 4.1.1-debian-12-r1
Platform charts
Override the below tag in values.yaml
rabbitmq:
image:
tag: 4.1.1-debian-12-r1
Troubleshooting on the Xray-RabbitMQ Quorum Queue migration:
How to confirm whether migration from Classic Queue to Quorum Queue is completed.
You can check the Xray console.log or xray-server-service.log and confirm the successful migration by comparing with the logs below. For that exec in to the xray-server container and check the below logs.
$ cat /opt/jfrog/xray/var/log/console.log | grep migrate_msgs_from_other_rabbitmq 0000-00-00T19:12:15.554Z [jfxr ] [INFO ] [203a476b7446023c] [migrate:258 ] [MainServer ] Migration migrate_msgs_from_other_rabbitmq prerequisites are not fulfilled: RabbitMQ connection settings for import were not defined 0000-00-00T19:26:47.427Z [jfxr ] [INFO ] [224299c5bc71bcdc] [migrate:258 ] [MainServer ] Migration migrate_msgs_from_other_rabbitmq prerequisites are not fulfilled: RabbitMQ connection settings for import were not defined shared.dataMigrations.migrate_msgs_from_other_rabbitmq.vhost (File): %2F 0000-00-00T19:32:33.366Z [jfxr ] [INFO ] [221411f0ba98ca36] [system_maintenance_service:254] [MainServer ] Checking rabbitmq shovel from configuration element dataMigrations.migrate_msgs_from_other_rabbitmq 0000-00-00T19:32:36.449Z [jfxr ] [INFO ] [221411f0ba98ca36] [system_maintenance_service:403] [MainServer ] Rabbitmq shovel check from configuration element dataMigrations.migrate_msgs_from_other_rabbitmq has completed successfully 0000-00-00T19:32:36.493Z [jfxr ] [INFO ] [221411f0ba98ca36] [te_msgs_from_other_rabbitmq:62] [MainServer ] Running data migration migrate_msgs_from_other_rabbitmq 0000-00-00T19:32:38.183Z [jfxr ] [INFO ] [221411f0ba98ca36] [te_msgs_from_other_rabbitmq:82] [MainServer ] Finished running data migration migrate_msgs_from_other_rabbitmq
How to confirm whether all messages have been migrated from the RabbitMQ to the Quorum Queue
Port forward the RabbitMQ container port 15672 and then log in to RabbitMQ UI, change vhost to ‘/’, and navigate to the Queue and stream. All Classic Queue messages should be zero. Or you can use the below curl command and check for the messages; all should be zero
curl -s -u "$RABBITMQ_USER:$RABBITMQ_PASS" \ "http://localhost:15672/api/queues/%2F"
How to check whether quorum queues are created after the upgrade
rabbitmqctl -p xray_haq list_queues name type messages_ready messages_unacknowledged consumers
This will list all the quorum queues created by Xray.