ActiveMQ replicated levelDB with zookeeper

I want to understand the role of zookeeper in leveldb replication for ActiveMQ broker.

  • About zookeeper choices: how zookeeper knows that out of all the clients connected to the zookeeper, the clients are ActiveMQ brokers who are fighting to be the master. Is there any specific key or configuration that is passed by all brokers connecting to zookeeper that says that we (say 3) ActiveMQ brokers belong to the same environment and are fighting to become the master.

  • At what interval does the slave broker copy data from the master broker? Any corner cases where data might get lost?

  • Does ActiveMQ support message sequencing guarantee using replicated leveldb? Am I talking about the case where the re-election of the master happens when the producer sends messages to the broker's queue?

Thank you,
Anui

+3


source to share


1 answer


  • By zkPath in Zookeeper configuration and by broker name.
  • Each message is synchronized with quorum brokers (nodes / 2 + 1) until the transaction is completed. Thus, the sync interval is not syncronized in real time. The cluster will not function if you do not have a broker quorum on the network, so there should be no data loss.
  • Messages are synchronized with most nodes synchronously. Reselecting will select the node with the latest updates. Orderly messages shouldn't be a problem. However, it is generally problematic to critically rely on the ordered messages in the message queue. As a rule, the order of messages will only be executed on "happy days". Dead letters, multiple consumers, etc. They can also mess up the order of messages.


+5


source







All Articles