A RabbitMQ plugin for migrating mirrored classic queues to quorum queues in RabbitMQ 3.13.x clusters.
A RabbitMQ plugin for migrating mirrored classic queues to quorum queues in RabbitMQ 3.13.x clusters.
- Two-phase migration algorithm with message-by-message transfer
- Automatic binding preservation and rollback support
- Selective migration by queue name or batch size
- EBS or tar-based snapshots before migration
- HTTP API and Web UI for control and monitoring
- Sets vhost default queue type to
quorumon completion
- RabbitMQ 3.13.x
- Multi-node cluster (3+ nodes recommended)
rabbitmq_managementplugin enabledrabbitmq_shovelplugin enabled- Khepri database disabled (classic Mnesia required)
Note: The setting quorum_queue.property_equivalence.relaxed_checks_on_redeclaration = true must be enabled in rabbitmq.conf before starting migration. This is validated during pre-migration checks. This setting allows applications to redeclare queues with classic arguments after migration without errors.
- README - This document! Overview, installation, and quick start
- Migration Guide - Migration process and validation
- Snapshots Guide - Snapshot modes and configuration
- HTTP API - Complete HTTP API reference
- API Examples - Practical API usage examples
- Configuration Reference - Configuration parameter reference
- EC2 Setup - AWS EC2 and IAM configuration if EBS snapshots are used
See the docs/ directory.
This plugin cannot detect per-message TTL set by publishers. Messages with the expiration property may expire during migration, causing message count differences.
Use the tolerance parameter to allow acceptable message loss:
curl -u guest:guest -X POST \
-H "Content-Type: application/json" \
-d '{"tolerance": 10.0}' \
http://localhost:15672/api/queue-migration/start/%2FSee Per-Message TTL Limitation for details and recommendations.
The plugin extends the RabbitMQ Management UI with:
- Queue Migration tab in Admin section
- Real-time progress monitoring
- Migration history
- Per-queue status details
rabbitmq-plugins enable rabbitmq_queue_migrationThis plugin must be enabled on all cluster nodes for consistent behavior.
Check if your cluster is ready for migration:
curl -u guest:guest -X POST http://localhost:15672/api/queue-migration/check/%2FMigrate all mirrored classic queues on the default vhost (/):
curl -u guest:guest -X POST http://localhost:15672/api/queue-migration/startTo migrate a specific vhost, include it in the URL path (URL-encoded):
# Migrate vhost "/production"
curl -u guest:guest -X POST http://localhost:15672/api/queue-migration/start/%2FproductionNote: The vhost must be specified in the URL path, not in the request body.
To skip unsuitable queues instead of blocking migration:
curl -u guest:guest -X POST \
-H "Content-Type: application/json" \
-d '{"skip_unsuitable_queues": true}' \
http://localhost:15672/api/queue-migration/start/%2FTo migrate queues in batches (useful for large vhosts):
# Migrate 10 queues at a time, smallest first
curl -u guest:guest -X POST \
-H "Content-Type: application/json" \
-d '{"batch_size": 10, "batch_order": "smallest_first"}' \
http://localhost:15672/api/queue-migration/start/%2Fmy-vhostTo migrate specific queues by name:
# Migrate only specified queues
curl -u guest:guest -X POST \
-H "Content-Type: application/json" \
-d '{"queue_names": ["orders", "payments", "notifications"]}' \
http://localhost:15672/api/queue-migration/start/%2Fproduction
# queue_names takes precedence over batch_size
curl -u guest:guest -X POST \
-H "Content-Type: application/json" \
-d '{"queue_names": ["queue1", "queue2"], "batch_size": 10}' \
http://localhost:15672/api/queue-migration/start/%2FNote: When
queue_namesis specified,batch_sizeandbatch_orderare ignored. Non-existent or ineligible queues are logged as warnings and skipped. If all specified queues are non-existent or ineligible, the migration fails with HTTP 400.
Check migration status:
curl -u guest:guest http://localhost:15672/api/queue-migration/statusGracefully interrupt a running migration:
curl -u guest:guest -X POST \
http://localhost:15672/api/queue-migration/interrupt/:migration_idIn-flight queue migrations complete while remaining queues are skipped. The migration ends with status interrupted.
See HTTP API for complete API reference.
The plugin uses a two-phase migration process to safely convert classic queues to quorum queues:
- Phase 1: Classic → Temporary Quorum (with
tmp_<timestamp>_prefix) - Phase 2: Temporary → Final Quorum (original name)
This approach ensures no name conflicts and allows safe rollback if issues occur. Empty queues use a fast path that skips the two-phase process.
Important: Migration suspends non-HTTP listeners broker-wide and closes all client connections. Plan migration windows accordingly.
See Migration Guide for complete details on the migration process, validation checks, queue eligibility, and argument conversion.
The plugin provides extensive configuration options for tuning performance, disk space management, and message count verification.
See Configuration Reference for complete configuration reference including all parameters, defaults, and tuning examples.
The plugin creates snapshots before migration to enable rollback if issues occur. Three modes are supported:
- EBS Mode (default) - AWS EBS snapshots for production
- Tar Mode - Tar archives for development/testing
- None Mode - Disabled (snapshots handled externally)
See Snapshots Guide for complete snapshot configuration and EC2 Setup for AWS IAM setup.
For troubleshooting guidance, see Troubleshooting Guide.
Quick checks:
- Migration fails to start: Run compatibility check to identify issues
- Migration stuck: Check status and broker logs
- Rollback required: Manual cleanup needed (automatic rollback available on Amazon MQ only)
See CONTRIBUTING for contribution guidelines.
See CONTRIBUTING for security issue reporting.
This project is licensed under the Apache-2.0 License.