Search code examples
rabbitmqfederationquorumqueue-federation

Queue federation with different queue types in RabbitMQ


I want to use queue federation to migrate messages from an old cluster to a new cluster. Essentially the clusters are the same, in that they have the same exchanges and queues, however in the old cluster the queues are of type classic and in the new cluster the queues are of type quorum.

I've set up federation between the 2 clusters but it only works if the queues are both of the same type. Is there a way I can override the queue type in the federation-upstream or in the federation policy so I can use queue federation in this scenario?


Solution

  • It appears that the issue is that the version of RabbitMQ being used only supports classic -> classic queue federation.

    From version 3.8.13 quorum -> quorum queue federation is supported:

    Federation Plugin

    Enhancements

    Quorum queues now can be federated.

    From version 3.8.18 classic -> quorum queue federation is supported:

    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.