Search code examples
rabbitmqspring-rabbitrabbitmq-exchangerabbitmqctl

Which is the best way to move data from exchange to another exchange for two differents RabbitMQ servers?


the thing is I have two RabbitMQ cluster servers (prod and dev) and in the prod server I have an exchange where external applications push data, but they only can push the data in one server I need to move the data from that prod exchange to a dev exchange in another server to make some testing. I was looking for a some extension that allows some kind of exchange binding inter servers, but I think that is not possible. the only solution I can think of is a service/application that creates its own queue, makes binding to prod exchange and push the data from its queue to the dev exchange in another server without modify another application. I want to know if this is the best way or if you know another more productive way?


Solution

  • You can make use of the Shovel Plugin. RabbitMQ Shovel, a core RabbitMQ plugin that unidirectionally moves messages from a source to a destination.

    There is no requirement to run the shovel on the same broker (or cluster) as its source or destination, although that's the most typical approach; the shovel can run on an entirely separate node or cluster.

    Checkout more here .. https://www.rabbitmq.com/shovel.html

    Here are some more links ..
    https://www.rabbitmq.com/shovel-dynamic.html
    https://www.rabbitmq.com/shovel-static.html