RabbitMQ policies apply selected queue and exchange settings at runtime, including dead-letter routing, TTL, and length limits. Queue type is fixed when the queue is declared; changing a matching policy does not convert a classic queue into a quorum queue. Some client-declared arguments also conflict with policy changes because declaration equivalence is checked when a queue already exists. A queue-type migration is therefore an application and topology cutover, not a single control-plane edit. The cutover must account for messages already in the old queue, publishers in flight, consumers with unacknowledged deliveries, and the binding that defines future routing.
RabbitMQ queue policies: migrate immutable queue type without losing the handoff
Operational decision
A report worker moves from a classic queue to a quorum queue named report-work-v2. The team declares the new queue and bindings, confirms the new publish path in a shadow environment, then fences the old publisher route at a recorded event boundary. Old consumers drain remaining work while new consumers process only v2 messages. Unique report-request IDs prevent duplicate side effects if a publisher retries during the fence. The operator compares accepted publish receipts, old and new queue depths, unacknowledged counts, and completed report IDs before retiring the old queue. Rollback means restoring the old route with an explicit deduplication rule, not deleting v2 while it still holds work.
Old queue: report-work (classic)
New queue: report-work-v2 (quorum)
Cutover marker: event ID report-48271
Fence old route; confirm new binding and publish receipts
Drain old consumers; reconcile completed request IDs
Retire old queue only after ready and unacknowledged reach zeroCost and verification
Running two queues temporarily costs memory, disk, broker CPU, and more complex dashboards. A duplicate routing interval can make both queues receive the same request; a gap can lose new requests. Use one observable routing boundary and an application-level event ID to reconcile either case. Policy updates should be reviewed for scope, priority, and unintended queues matching the rule. Test rollback before the cutover, including how to drain work from v2. Do not hide topology drift by changing producers to tolerate conflicting declarations silently.
Common Mistakes
- Do not expect a policy to mutate an existing queue's type.
- Do not delete an old queue merely because its ready count is zero while deliveries remain unacknowledged.
- Do not run a dual-route cutover without a duplicate-effect guard.
Connected lessons
- DevOps: delivery, infrastructure, and reliable operations
- GitOps ownership transfer: keep one reconciler authoritative per resource
- Queue consumers: acknowledgement, idempotency, and backlog
- Release evidence: tie one deployed digest to one approval decision
- RabbitMQ publishing: distinguish broker confirmation from queue routing
- RabbitMQ quorum queues: plan node maintenance around majority availability
