What Is New in RabbitMQ 3.12
RabbitMQ 3.12 delivers significant performance gains, lower memory usage, and important new management features. The focus is on optimizing core queue types, reducing resource overhead, and providing finer-grained control for operators.
| Category | Key Changes |
|---|---|
| Core Server & Queues | Major throughput and latency improvements for quorum and classic queues. Classic Queue v2 (CQv2) becomes the mature default. New per-queue and per-consumer delivery timeout controls. |
| Resource & Memory | Dramatically reduced memory footprint for MQTT/Web MQTT connections and quorum queues. Lower memory spikes during metric collection. |
| Management & Operations | Policies can now target specific queue types. New commands for global permissions, vhost metadata, and stream leader rebalancing. Ability to pre-configure users for new vhosts. |
| Compatibility | Requires Erlang 25+. All 3.11.x feature flags must be enabled before upgrade. Initial Erlang 26 support introduced. |
| Plugins | Enhanced OAuth2 configurability, full IDP support in Management plugin, and critical bug fixes for Federation and Consul discovery. |
How have core queue performance and memory usage improved?
The core improvements target both quorum and classic queues, making them faster and more predictable under load. For quorum queues, you'll see higher sustained throughput, especially with large backlogs or when using Single Active Consumer. The changes also reduce peak memory usage, which helps with stability.
Classic queues get the most benefit from the now-mature version 2 (CQv2) storage engine. The old lazy and non-lazy modes are gone; CQv2 always behaves like the old lazy mode, moving message data to disk aggressively. This leads to a much lower and more consistent memory footprint, which is a big win for systems with many queues or long backlogs.
Key Queue Optimizations
- Quorum Queues: Better throughput, lower latency, reduced memory peaks.
- Classic Queues (v2): Always "lazy", leading to predictable, low memory use and faster node shutdowns.
- Streams: More efficient leader distribution across cluster nodes.
What new operational controls and CLI tools are available?
This release adds several commands and configuration options that give operators more precise control. You can now apply policies to specific queue types, limit resource usage, and manage vhosts and permissions more efficiently.
A notable addition is the delivery_acknowledgement_timeout, which can be set per queue via policy or per consumer via arguments. This gives you fine-grained control over message redelivery behavior.
rabbitmqctl set_policy my-policy ".*" '{"delivery-acknowledgement-timeout": 5000}' --apply-to quorum_queues
New CLI Commands and Limits
rabbitmqctl update_vhost_metadata: Update vhost description, tags, or default queue type.rabbitmqctl set_permissions_globally: Set a user's permissions across all existing vhosts at once.rabbitmq-streams restart_stream: Force a new leader election for a stream to aid in rebalancing.rabbitmq-queues rebalance: Now supports streams alongside classic and quorum queues.- New runtime limits in
rabbitmq.conf: Control max shovels (runtime_parameters.limits.shovel) or federation links per node.
How does RabbitMQ 3.12 handle authentication and authorization?
The OAuth 2 plugin gains more flexibility, and the Management plugin now fully supports Identity Provider-initiated login (IDP). This makes integrating with modern external identity systems smoother.
You can now configure or strip the scope prefix used by the OAuth 2 plugin when mapping JWT scopes to RabbitMQ permissions. This is crucial for adapting to your identity provider's token format.
# In rabbitmq.conf
auth_oauth2.scope_prefix = rabbitmq.
Furthermore, variables like {username} and {vhost} can now be used in topic authorization rules, enabling more dynamic permission structures.
A deprecated, UAA-specific configuration set has been removed from the Management plugin (management.enable_uaa, management.uaa_*). If you're still using these, you'll need to update your configuration.
What are the critical upgrade requirements for version 3.12?
Upgrading to 3.12 has two non-negotiable prerequisites: Erlang 25+ and all 3.11.x feature flags enabled. Missing either will prevent the node from starting.
If you're planning a simultaneous upgrade to Erlang 26, your cluster must be on at least RabbitMQ 3.11.17 first to ensure quorum queue safety. A safer path is to upgrade to 3.12 on Erlang 25, then upgrade Erlang to 26.
Upgrade Checklist
- Erlang: Version 25.0 or higher is required. Erlang 26 is supported but very new.
- Feature Flags: Enable all feature flags from the 3.11.x series before upgrading.
- Mixed Clusters: 3.12 nodes can co-exist with 3.11.17+ nodes for rolling upgrades, but don't run mixed versions for more than a few hours.
Which bugs were fixed and what behavior changes should I watch for?
Several important bugs were squashed, particularly around edge cases in queue behavior and plugin interactions. There are also a few minor breaking changes in APIs and metrics.
Quorum queues now have a disaster recovery mechanism to shrink to a single replica if a majority are permanently lost. The x-delivery-count header is no longer added on first delivery (0) to improve performance, and the x-mqtt-dup header has been removed from consumer deliveries.
Notable Fixes and Changes
- Streams: Can now be used with at-most-once dead lettering and the event exchange.
- Federation: Fixed a quorum queue issue that could stall federation links.
- Classic Mirrored Queues: Fixed inconsistent overflow handling with length limits.
- MQTT Metrics: Some channel-level metrics in the management UI are no longer available due to a plugin refactor. Connection and queue metrics remain.
- HTTP API: The key for setting default queue type on vhost creation changed from
defaultqueuetypetodefault_queue_type.
FAQ
Do I need to enable any feature flags before upgrading to RabbitMQ 3.12?
Yes. You must enable all feature flags from the 3.11.x release series before starting the upgrade. If they are not enabled, RabbitMQ 3.12 nodes will refuse to start. This is similar to the requirement when upgrading to 3.11.0.
Can I upgrade directly from 3.11.x to 3.12 while also upgrading Erlang from 25 to 26?
It's possible but requires caution. Your cluster must be on at least RabbitMQ 3.11.17 before doing a combined upgrade to ensure quorum queue safety. A more conservative approach is to upgrade to RabbitMQ 3.12 on Erlang 25 first, then upgrade Erlang to 26 on all nodes.
What's the biggest performance win in 3.12 for MQTT users?
The memory footprint per MQTT connection has been drastically reduced -- by up to 90% for some workloads. MQTT-over-WebSockets (Web MQTT) connections also see a significant double-digit percentage reduction in memory usage.
How do I apply a policy only to quorum queues now?
Use the new --apply-to flag with rabbitmqctl set_policy. For example: rabbitmqctl set_policy my-policy ".*" '{"max-length": 1000}' --apply-to quorum_queues. This prevents the policy from affecting classic queues or streams with the same name pattern.
The management UI is missing some metrics for my MQTT clients. Is this a bug?
No. Due to internal refactoring of the MQTT plugin, some channel-level metrics are no longer exposed in the UI. Connection-level metrics (data rates) and queue metrics for MQTT subscribers are still available. The trade-off is a much lower memory footprint per connection.