Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Brokers network Cluster of ActiveMQ

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. The corresponding order in the master-slave uri list of cluster configuration method types is that MASTER,SLAVE1,SLAVE2...SLAVE;master-slave acts as the master and slave between brokers, and only one broker can be connected at a time. Usually connect the master first. If the master is not connected, the message synchronization mechanism between the connected slave;brokers is to share data through shared storage, such as jdbc/kahaDB/replicaLevelDB (zookeeper). At the same time, the brokers also obtains the lead of the broker (that is, which broker is activated) by obtaining access to the data store. When zookeeper does masterslave, the name of brokers must be the same, otherwise zookeeper will think that it does not comply with the rules of 2n+1. The configuration of masterslave can be configured either in activeMQ.xml or on the client side. It is generally recommended to use it in client. Although master-slave can improve availability, load balancing is weakened and slave broker servers are often wasted. Broker static discover

Represents the current unidirectional network connection between local broker and remote broker (61616tic61617). That is, local broker can pass messages to remote broker, but not vice versa. The duplex= "true" property configuration enables two-way communication.

Broker multicast discover

Multicast discovery automatically discovers and communicates with the broker in the network. Note: must be in the same network.

This is rarely done in the actual configuration, because there is no guarantee which brokers has established a connection. The configuration for master-slave is not very good either.

DynamicallyIncludedDestinations

When the connected broker in the networkConnector has a customers, then the corresponding destinations will be passed to the corresponding broker. Otherwise, it will not be delivered. This approach is more appropriate for the point-to-point approach.

StaticallyIncludedDestinations

Regardless of whether the broker connected to the networkConnector has a customers or not, the message will be sent to each broker. This approach is more suitable for topic messaging.

ExcludedDestinations

Some detination specified in networkConnector will not be sent to remote brokers.

Parameter uri= "static: (tcp://host1:61616,tcp://host2:61616)? maxReconnectDelay=5000&useExponentialBackOff=false" of uri in networkConnector

InitialReconnectDelay: the interval between reconnections.

MaxReconnectDelay: maximum reconnection time. That is, initialReconnectDelay times

UseExponentialBackOff: if a connection fails, whether the reconnection time increases sequentially.

BackOffMultiplier: when useExponentialBackOff=true, the multiple of the reconnection time interval, that is, initialReconnectDelaybackOffMultiplier

NetworkConnector property configuration

Name: connection name, which must be unique in multiple cases.

DynamicOnly:

DecreaseNetworkConsumerPriority:

NetworkTTL:

MessageTTL:

ConsumerTTL:

ConduitSubscriptions: pipeline subscription. That is, if a broker has more than one customers, it can only be thought of as a customer.

ExcludedDestinations:

DynamicallyIncludedDestinations:

UseVirtualDestSubs:

StaticallyIncludedDestinations:

Duplex: whether to enable duplex communication

PrefetchSize:

SuppressDuplicateQueueSubscriptions:

BridgeTempDestinations:

AlwaysSyncSend:

StaticBridge: static connection bridge. Use in conjunction with staticallyIncludedDestinations

UserName:networkConnector connection user name

Password:networkConnector connection password

2. Cluster instance

Broker-master

Broker-slave01

Broker-slave02

Broker-cluster01

Broker-cluster02

Security configuration of brokers

File:$ {activemq.conf} / credentials.properties

Reference documentation:

Http://activemq.apache.org/networks-of-brokers.html

Http://shift-alt-ctrl.iteye.com/blog/2070531

Https://www.cnblogs.com/shihaiming/p/6018916.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report