Skip to content

Commit b855d67

Browse files
lmicciniclaude
andcommitted
Enable Continuous Membership Reconciliation for quorum queues
Quorum queues can end up under-replicated when clients declare queues while not all RabbitMQ nodes are available (e.g. during rolling restarts or parallel pod startup after a data-wipe upgrade). RabbitMQ does not retroactively grow membership, so the missing nodes stay missing. Enable CMR in the RabbitMQ 4.x config for multi-node clusters so that quorum queues are automatically grown to the target group size. CMR's trigger_interval (10s default) fires when a node joins, covering rolling restarts. The periodic interval (60min default) acts as a background safety net. auto_remove is set to false so nodes temporarily down during restarts are not shrunk. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3dfdbc3 commit b855d67

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

internal/rabbitmq/configmap.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ func buildOperatorDefaults(r *rabbitmqv1.RabbitMq, IPv6Enabled bool, configVersi
137137
)
138138
}
139139

140+
// Enable Continuous Membership Reconciliation (CMR) for multi-node clusters
141+
// on RabbitMQ 4.x. CMR automatically grows quorum queues onto nodes that are
142+
// missing from the membership, replacing the need for manual
143+
// `rabbitmq-queues grow` calls after upgrades or rolling restarts.
144+
// trigger_interval (10s) fires when a node joins, covering rolling restarts.
145+
// interval (60min default) is a background safety net.
146+
if IsVersion4OrLater(configVersion) && getReplicaCount(r) > 1 {
147+
config = append(config,
148+
"quorum_queue.continuous_membership_reconciliation.enabled = true",
149+
fmt.Sprintf("quorum_queue.continuous_membership_reconciliation.target_group_size = %d", getReplicaCount(r)),
150+
"quorum_queue.continuous_membership_reconciliation.auto_remove = false",
151+
)
152+
}
153+
140154
// Prometheus and management bind address
141155
config = append(config, "prometheus.tcp.ip = ::")
142156
config = append(config, "management.tcp.ip = ::")

0 commit comments

Comments
 (0)