Restarting exchange federation link downstream node leaves orphan queue on upstream
Author: lukebakkenCreated Apr 27, 2022Updated Sep 13, 2026
Reproduction steps:
- Create two RabbitMQ environments. I'll call them
rmq-usfor the upstream,rmq-dsfor the downstream. rmq-uscan be a single node,rmq-dsmust be a cluster.- Set up an exchange in the
rmq-usenvironment to be federated. - Set up a federation link on
rmq-dsto federate the exchange from the previous step. This will create the associated queue from which the downstream consumes. - In the
rmq-dsenvironment, figure out which node is running the federation link. - Restart the node running the federation link.
- The upstream queue remains, and a new one is created from which to consume. The "orphaned" queue is still bound to the federated exchange so it will fill with messages.
Test project to reproduce:
https://github.com/lukebakken/docker-rabbitmq-cluster
Steps:
https://github.com/lukebakken/docker-rabbitmq-cluster.git
cd docker-rabbitmq-cluster
make image-base
make image-vesc-1034
make up
make importAt this point, you should be able to browse to localhost:15682 to see the upstream management UI, and localhost:15672 to see the downstream. Make a note of which node is running the federation link. Let's say the node is rmq2-ds.local. Run this command to restart it:
docker compose restart rmq2-dsYou should now see the orphaned queue in the upstream, collecting messages.
Source: rabbitmq/rabbitmq-server