RabbitMQ 中不同队列类型的队列联合

Queue federation with different queue types in RabbitMQ

我想使用 queue federation 将消息从旧集群迁移到新集群。本质上,集群是相同的,因为它们具有相同的交换器和队列,但是在旧集群中,队列的类型为 classic,而在新集群中,队列的类型为 quorum.

我已经在 2 个集群之间建立了联盟,但它仅在队列类型相同时才有效。有没有一种方法可以覆盖联合上游或联合策略中的队列类型,以便我可以在这种情况下使用队列联合?

看来问题是所使用的 RabbitMQ 版本仅支持 classic -> classic 队列联合。

version 3.8.13 quorum -> quorum支持队列联合:

Federation Plugin

Enhancements

Quorum queues now can be federated.

来自 version 3.8.18 classic -> quorum 支持队列联合:

Federation Plugin

Bug Fixes

Queue federation will now declare queues on the upstream side only if it does not already exist. This makes it possible to federate pre-declared queues of different types.

Note that such setups should be considered edge cases. Queue federation was never meant to federated queues of different types under the same name in different clusters. Such setups could be useful in Blue/Green deployment upgrade scenarios but otherwise should be avoided.