Github user mvtorres commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2286
  
    When I was running on debug mode, it was actually hitting
    
    
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.ActiveMQConnectionFactory(boolean,
 TransportConfiguration...)
    
    instead of 
    
    
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.ActiveMQConnectionFactory(ServerLocator)
    
    so useTopologyForLoadBalancing was not being set on the ServerLocator.
    
    I was using the following to get the ConnectionFactory
    
    `
    Properties p = new Properties();            
p.put("java.naming.factory.initial","org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
                
p.put("connectionFactory.ConnectionFactory","tcp://localhost:61616?useTopologyForLoadBalancing=false");
    ConnectionFactory cf = (ConnectionFactory) 
initialContext.lookup("ConnectionFactory");
    `


---

Reply via email to