I want to setup an ActiveMQ Artemis HA cluster with 4 nodes: two masters, two slaves.
I already tried to to it with only one node, and it's working. Now I have to adapt the ConnectionFactory in my code so that it can connect with the cluster.
In the ActiveMQ Artemis documentation I found something like that:
@Bean
public ConnectionFactory connectionFactory() {
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName());
ConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.CF, transportConfiguration);
return cf;
}
The JavaDoc says:
Creates an ActiveMQConnectionFactory that receives cluster topology updates from the cluster as servers leave or join and new backups are appointed or removed.
How can I set a specified url here for ssl use and so on?
@Bean
public ConnectionFactory connectionFactory() {
ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?sslEnabled=true&trustStorePath=activemq.example.truststore&trustStorePassword=activemqexample");
return cf;
}
JMS connection factory, not further specified in documentation.
Are here topology infos downloaded?
What and how is the intended way of using it?