You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/migrate-mcq-to-qq.md
+30-24Lines changed: 30 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,9 @@ See the License for the specific language governing permissions and
15
15
limitations under the License.
16
16
-->
17
17
18
-
##Migrate your RabbitMQ Mirrored Classic Queues to Quorum Queues
18
+
# Migrate your RabbitMQ Mirrored Classic Queues to Quorum Queues
19
19
20
-
Which is better: mirrored classic queues or quorum queues? Quorum Queues are the much better choice and they will be the only choice starting with RabbitMQ version 4.0. This information explains why, the reasons why you should migrate from mirrored classic queues to quorum queues, the ways to handle features during the migration, and includes procedures for some of the migration routes you can take.
20
+
Which is better: mirrored classic queues or quorum queues? Quorum Queues are the much better choice and they will be [the only option starting with RabbitMQ version 4.0](https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/). This information explains why, the reasons why you should migrate from mirrored classic queues to quorum queues, the ways to handle features during the migration, and includes procedures for some of the migration routes you can take.
21
21
22
22
You should migrate to mirrored classic queues for the following reasons:
23
23
@@ -39,9 +39,11 @@ Incompatible features can be either referenced in policies or in the source code
39
39
40
40
The general policies and arguments related to mirroring are:`ha-mode`, `ha-params``ha-sync-mode`, `ha-promote-on-shutdown`, `ha-promote-on-failure`, and `queue-master-locator`.
41
41
42
-
The migration process you take can be one of the following:
43
-
*[Migrating the Queues by Virtual Host](#migrate-the-queues-by-virtual-host) is probably the most efficient migration path you can take if it is an option for you. If all the incompatible features are cleaned up or moved to policies, the existing code should work with both mirrored classic queues and quorum queues. You only need to change the connection parameters to connect to the new virtual host that you created for the quorum queues.
44
-
*[Migrating in Place](#migrate-in-place) means you re-use the same virtual host. You must be able to stop all consumers and producers for a given queue while the migration is in progress.
*[Migrating the Queues by Virtual Host](#migrate-the-queues-by-virtual-host) is probably the most efficient migration path you can take if it is an option for you. If all the incompatible features are cleaned up or moved to policies, the existing code should work with both mirrored classic queues and quorum queues. You only need to change the connection parameters to connect to the new virtual host that you created for the quorum queues
46
+
*[Migrating in Place](#migrate-in-place) means you re-use the same virtual host. You must be able to stop all consumers and producers for a given queue while the migration is in progress
45
47
46
48
Before deciding which migration method you can use, you must first find the mirrored classic queues and the features they are using.
47
49
@@ -51,25 +53,26 @@ To find the mirrored classic queues that must be migrated, run the following scr
51
53
52
54
Note, the following command uses `effective_policy_definition` parameters, which are only available since RabbitMQ version 3.10.13/3.11.5. If it's not available, you can use `rabbitmqctl` from any RabbitMQ version later than 3.10.13/3.11.5, or manually match the policy name to it's definition.
53
55
54
-
```bash
56
+
<preclass="lang-bash">
55
57
#!/bin/sh
56
58
printf "%s\t%s\t%s\n" vhost queue_name mirrors
57
59
for vhost in $(rabbitmqctl -q list_vhosts | tail -n +2) ; do
58
60
rabbitmqctl -q list_queues -p "$vhost" name durable policy effective_policy_definition arguments mirror_pids type |
59
61
sed -n '/\t\[[^\t]\+\tclassic$/{s/\t\[[^\t]\+\tclassic$//; p}' |
All mirrored classic queues that include `ha-mode` in their effective policy definition must be migrated to a different type of queue. All these queues are listed as mirrored classic queues in the Management UI and CLI. Find the policies that apply it by running the following script:
for vhost in $(rabbitmqctl -q list_vhosts | tail -n +2) ; do
69
72
rabbitmqctl -q list_policies -p "$vhost" |
70
73
grep 'ha-mode'
71
74
done
72
-
```
75
+
</pre>
73
76
74
77
## <aid="mcq-changes-way-queue-is-used"class="anchor"href="#mcq-changes-way-queue-is-used">Mirrored Classic Queue Features that require Changes in the Way the Queue is Used</a>
75
78
@@ -96,15 +99,15 @@ Global [QoS prefetch](https://rabbitmq.com/quorum-queues.html#global-qos) where
96
99
97
100
To find out if this feature is used, run the following command on a running system and check for non-empty output:
98
101
99
-
```bash
102
+
<preclass="lang-bash">
100
103
rabbitmqctl list_channels pid name global_prefetch_count | sed -n '/\t0$/!p'
101
-
```
104
+
</pre>
102
105
103
106
A list of channel PIDs that have global QoS turned on are returned. Then, run the following command to map the channel PID to a queue name to verify if it is a mirrored classic queue.
104
107
105
-
```bash
108
+
<preclass="lang-bash">
106
109
rabbitmqctl list_consumers queue_name channel_pid
107
-
```
110
+
</pre>
108
111
109
112
### `x-cancel-on-ha-failover` for Consumers
110
113
@@ -183,11 +186,12 @@ URI pointing to the OLD\_VHOST: `amqp:///OLD_VHOST`. (Note that the
183
186
default vhost URI is `amqp:///%2f`).
184
187
185
188
The federation upstream can be created using the management UI or the CLI:
Copy file name to clipboardExpand all lines: site/quorum-queues.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,11 @@ limitations under the License.
21
21
22
22
The quorum queue is a modern queue type for RabbitMQ implementing a durable,
23
23
replicated FIFO queue based on the [Raft consensus algorithm](https://raft.github.io/).
24
-
It is available as of RabbitMQ 3.8.0.
25
24
26
-
Quorum queues and [streams](./streams.html) now replace the original replicated [mirrored classic queues](./ha.html). Mirrored classic queues are [now deprecated and scheduled for removal](https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/). You can [Migrate your RabbitMQ Mirrored Classic Queues to Quorum Queues]() now.
25
+
Quorum queues and [streams](./streams.html) replace durable [mirrored queues](ha.html), the original
26
+
replicated queue type which is [now deprecated and scheduled for removal](https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/).
27
+
A separate [migration guide](./migrate-mcq-to-qq.html) explains the options for installations that use
28
+
classic mirrored queues.
27
29
28
30
Quorum queues are optimized for [set of use cases](#use-cases) where [data safety](#data-safety) is
29
31
a top priority. This is covered in [Motivation](#motivation).
0 commit comments