0
votes

Current tech stack:

A. ActiveMq with master-slave configuration using KahaDb1 with configuration brokerUrl: failover:(tcp://master1:61616,tcp://slave1:61616)?randomize=false

Above tech stack we want to migrate using amazonMq since both of them works on the same protocol, we are assuming not much of the code changes required from our side just the configuration tweak:

B. AmazonMq setup with it's master-slave node and separate kahaDb2.

Now we want to customize endpoint is such a manner where we can listen to both the endpoints(activemq-master broker and amazonmq-master broker) continuously, is that even possible??

I know we can set something like below :

failover:(ssl://on-premises-broker.example.com:61617,ssl://b-1234a5b6-78cd-901e-2fgh-3i45j6k178l9-1.mq.us-east-2.amazonaws.com:61617)?randomize=true

Problem with the above condition is that we are unable to find a way where we can mention slave broker as well, since both cluster have there separate slave nodes as well. In case of a failover on the master node we want to switch to the slave node of the same architecture (whether is the activemq or amazonmq) how can I achieve this by actively listening to both brokers?

2

2 Answers

0
votes

Fixed it by writing to separate beans for consuming messages from activemq and amazonMQ respectively.

0
votes

Create a configuration for application fail-over and when master IP is not connecting then use AWS MQ client libraries to connect.

Failover will not work if both master and slave are from different vendors as client jar will be different for both.