Why do RabbitMQ upgrades go wrong?
"A lot of times what companies struggle with, or they forget, is they don't do frequent upgrades. Sometimes it takes a couple years to do an upgrade. And if they try to go from where they are straight to the latest, they get a bunch of unforeseen issues — because what they should have done is upgrade step by step."
— Jeff Sogolov, AceMQ Engineer, Lucidya engagement session, May 2025
What is the required upgrade path from 3.x to 4.x?
rabbitmqctl enable_feature_flag allWhat about Erlang compatibility?
- 3.12 supports Erlang 25.x minimum
- 3.13 requires Erlang 26 minimum (26.2 recommended)
- 4.x also requires Erlang 26.2 minimum
"You can upgrade Erlang from 25 to 26.2 directly. Once you're on 26.2, you upgrade RabbitMQ to 3.13 — you already have the right Erlang. Then from 3.13 to 4.1, same Erlang version still applies."
— Jeff Sogolov, AceMQ Engineer, Lucidya session, May 2025
Strategy 1: Rolling Upgrade (In-Place)
- Stop node 1 (service only — not the OS)
- Upgrade Erlang on node 1 to the required version
- Upgrade RabbitMQ on node 1 to the target version
- Start the RabbitMQ service on node 1
- Confirm node 1 has rejoined the cluster and is healthy
- Repeat for nodes 2 and 3
Strategy 2: Blue-Green Deployment
- Provision a new cluster (green) on the target RabbitMQ and Erlang version
- Configure a federated queue upstream on the green cluster pointing to the blue cluster
- As consumers are moved to the green cluster, federation pulls messages from blue to green automatically
- Once all consumers are on green, move producers to green
- Once producers are moved, drain any remaining messages from blue using the shovel plugin
- Decommission the blue cluster
"Blue-green is zero downtime. You can do it at any time — there's no maintenance mode. The cost is that you have two clusters running at the same time, which some companies can't afford, especially on-prem. But for AWS-based deployments where you can spin up new clusters easily, it makes a lot of sense."
— Jeff Sogolov, AceMQ Engineer, Lucidya session, May 2025
Pre-upgrade checklist
- Confirm current RabbitMQ version and identify the required upgrade path
- Check the Erlang compatibility matrix for target and intermediate versions
- Enable all feature flags on the current version (rabbitmqctl enable_feature_flag all)
- Back up cluster definitions (topology, users, permissions) via Management API
- Validate staging environment upgrade end-to-end before touching production
- Confirm load balancer health check behavior with nodes taken offline
- Test client reconnect behavior in staging under simulated node restarts
- Schedule during lowest-traffic window if using rolling upgrade
- Have rollback plan documented before starting