SET of messaging middleware architecture implementation

SET architecture design: Based Cluster

While two clusters, data synchronization if necessary, then by the Federation of node3 cluster and a cluster node1 II can synchronize data, the data can be synchronized by mirroring the queue in the cluster.

 

Implementation: data synchronization via plug Federation

1, ready environment: + centos7 virtual machine installed rabbitmq 

      Two nodes: 192.168.2.208, 192.168.2.209

2, start the service service rabbitmq-server start & Enable or background

3, enable the Federation management plug

rabbitmq-plugins enable rabbitmq_federation
rabbitmq-plugins enable rabbitmq_federation_management

4, access http://192.168.2.209:15672/#/users control station will appear as shown:

5, the upstream node selected 192.168.208, 192.168.2.209 a downstream node:

In operation 192.168.2.209 downstream node:

(1) Create a switch, and a binding queue

(2) http://192.168.2.209:15672/#/users control station click Federation Upstreams,

 Build relationships with the upstream node:

 Next, click polices, add a policy:

(3) After adding the exchange and observation queue:

Click Federation status:

 

Open upstream node 192.168.2.208:

Open Connections:

Open exchange, more than a gray, which is a federation of channels, can not be used to send messages, as well as just created test.exchange switch:

6, sends a message Test

Send a message to the upstream node 192.168.2.208 test.exchange 

To see whether the downstream nodes can be synchronized to the message 192.168.2.209.

如果在192.168.2.208上也想接收该消息并消费,在208上新建一个队列与该test.exchange建立绑定即可。这样就可以实现多中心的数据同步。

 

Guess you like

Origin blog.csdn.net/LuuvyJune/article/details/94435884