I am trying to use Apache Camel and the Qpid JMS client to connect to an ActiveMQ Artemis active-active cluster running in two different nodes (VM's). I'm using ActiveMQ Artemis 2.17.0.
Broker1 --- Host1:5672 (active)
Broker2 --- Host2:5672 (active)
I'm trying to figure out what should be the remoteURI
configuration for my org.apache.qpid.jms.JmsConnectionFactory
instance. Using ampq://host1:5672,ampq://host2:5672
didn't work. I haven't seen any reference in the documentation.
I want the producer to push messages to both the brokers either by Round-robin or default way, and I want the consumer to consume those message from both brokers either in load balanced way.
For master-backup configuration the below worked:
<bean id="jmsampqConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
<property name="remoteURI" value="failover:(ampq://host1:5672,ampq://host2:5672)" />
<property name="username" value="user"/>
<property name="password" value="pass"/>
</bean>
For a master-slave configuration this worked. So when the master is active the client sent messages to master, when master is down the client pushed messages to slave. We didn't had any issues there. However, for active-active this won't work. What URL should I use?
For reference, broker configuration is the same as in my previous Stack Overflow question.