I' using below code to connect to Artemis 2.42.0:
@Bean
  public ActiveMQConnectionFactory connectionFactory() throws Exception {
    ActiveMQConnectionFactory connectionFactory = null;

    String brokerUrls = 
"tcp://hostname1:port1,tcp://hostname2:port2,hostname3:port3,tcp://hostname4:port4,tcp://hostname5:port5,tcp://hostname6:port6";
    String connectionUrl = "(" + brokerUrls + 
")?ha=true&retryInterval=2000&reconnectAttempts=-1";

    connectionFactory = new ActiveMQConnectionFactory(connectionUrl, userName, 
password);

    // Client-specific settings
    connectionFactory.setReconnectAttempts(reconnectAttempt);
    connectionFactory.setRetryInterval(retryInterval);
    connectionFactory.setCallTimeout(callTimeout);

    return connectionFactory;
  }

The problem is: producer connected to hostname 1 and put the messages to queue 
in hostname 1 but the consumer is connected to hostname 3 and listening to 
queue in hostname 3 so the messages are never being picked up.

How to solve this problem?

Thanks



[cid:[email protected]]

Rahman Gunawan
SITSS Software Developer
NASA SEWP / SITSS
HALVIK Corporation
7601 Ora Glen Dr, Greenbelt, MD 20770
C: 240.444.6003
O: 301.614.5257
[email protected]<mailto:[email protected]>


Reply via email to