Get the App
SLTechnology News&Howtos  ›  Servers  › 

RabbitMQ migrates data through the shovel plug-in

Shulou Source: shulou.com Published: 2022-06-03 00:48:36 10月02日 Update

Preface

RabbitMQ data migration scenarios may be encountered in the production environment, such as switching cloud service vendors, data migration between different Region, and new RabbitMQ instances, where data needs to be synchronized to new RabbitMQ instances.

Prerequisites:

The source RabbitMQ instance opens the shovel plug-in.

The shovel plug-in is opened for the destination RabbitMQ instance.

The source instance and the destination instance can communicate with each other over the network.

Currently, take the data migration of RabbitMQ instances under different Region of Huawei Cloud as an example. One cluster instance has been created in Huawei Cloud Beijing Region and Shanghai Region. Now you need to migrate the data from Shanghai Region to Beijing Region.

Operation steps

1. The Shovel plug-in is opened for both Shanghai Region and Beijing Region instances. The instance of Shanghai Region has 3 queues with 10000 pieces of data in each queue:

2. Both Shanghai Region and Beijing Region instances are bound with public network ip.

3. Apply for a stand-alone instance in Region in Beijing, bind the public network ip, and open the Shovel plug-in for data transfer.

4. Log in to the management console of the stand-alone instance, and click Admin-> Shovel Management.

5. Configure Shovel

6. After the configuration is completed, the figure is as follows:

7. You can see the status of Shovel through Shovel Status

8. By this time, the queue data in the RabbitMQ instance of Shanghai Region is 0, while that in the RabbitMQ instance of Beijing Region is 10000. You can see that the data has been completely migrated.

▲ Shanghai

▲ Shanghai

9. At this time, the data will be produced to the queue of Shanghai Region, and the data will also be synchronized to Beijing in real time.

▲ synchronization: Shanghai

▲ synchronization: Beijing

After ▲ synchronization is completed: Shanghai

After ▲ synchronization is completed: Beijing

Tags: Examples data Shanghai Beijing synchronization queues plug-ins different stand-alone purpose public network Huawei fixed production configuration between examples premises preface manufacturer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi MySQL Docker macOS OPPO Reno