0

In ActiveMQ Artemis, I'm wondering if it's possible to enable replication only between two nodes, and have some outside mechanism inform the Active MQ Artemis processes living on each node which is the primary. In other words, the election of the primary is handled by an outside application which informs Artemis of its status.

More specifically, the environment our current HA solution is deployed in has a virtual IP address which directs traffic to one of two VMs based on their availability. i.e., if one is down, it directs traffic to the other, with only one VM receiving data at any given time.

If there is some kind of hook into the virtual IP mechanism, we could theoretically have it tell a listening process on each of the VMs if it the active receiver. That process could then tell ApacheMQ Artemis "you are the primary" or "you are the secondary".

Assuming the hook is available, is it possible to enable this functionality in Artemis? i.e., replication between two VMs only, and have an outside process lit it know which is available?

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43
Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
  • What exactly do you mean by "no failover" (in the title)? – Justin Bertram Dec 12 '22 at 04:01
  • What is the benefit of this approach to the normal approach of the broker's themselves determining who is primary and who is backup? – Justin Bertram Dec 12 '22 at 04:01
  • @JustinBertram - by "no failover", I mean, that the determination of the active node is determined by an outside entity. The benefit would be the ability to have HA with only two nodes. – Jack BeNimble Dec 12 '22 at 11:29
  • @JustinBertram - the benefit would be to able to support replication. Having said that, and based on your answer, it seems this benefit is achievable using classic configuration. I created another post to confirm this, along with some questions about the details. Thanks!!! – Jack BeNimble Dec 12 '22 at 12:33
  • But by requiring an "outside entity" to determine the status of the brokers you _won't_ have HA with "only two nodes" since the "outside entity" will also be required. This would be roughly equivalent to a primary/backup pair plus a ZooKeeper node but in your case the "outside entity" would take the place of the ZooKeeper node. Therefore, I don't see the benefit of such a scheme. – Justin Bertram Dec 12 '22 at 16:36

1 Answers1

1

ActiveMQ Artemis replication configuration requires identifying the primary and the backup explicitly. There is no way for an external entity to specify which broker is the primary and which broker is the backup.

However, it's still possible for the virtual IP address to direct traffic to one of the two VMs based on the broker's availability since the backup broker will not be able to receive connections until the primary broker fails at which point the backup broker will become active and begin accepting connections.

Justin Bertram
  • 29,372
  • 4
  • 21
  • 43