Hi All,

  I am running 6 brokers/instances of artemis ( 3 master/live, 3 slave).
While sending messages to them, everything works fine as messages are
loadbalanced. For example, if I send 1000 messages each node will get 333.
All 3 master/live nodes form a cluster and I can see that via the web
console.

 I am facing an issue while trying to receive those messages, it appears
that I am only getting messages that got delivered to connected node only.
I am using code like below:
--------

@JmsListener(destination = "exampleQueue", containerFactory =
"jmsListenerContainerFactory")
 public void myMessageReceiver(Message msg) {
  messageCounter++;
}
-----

@Bean

public JmsListenerContainerFactory<?> jmsListenerContainerFactory() {

DefaultJmsListenerContainerFactory factory = new
DefaultJmsListenerContainerFactory();

factory.setConnectionFactory(connectionFactory());

return factory;

}

@Bean

public ConnectionFactory connectionFactory() {

return new ActiveMQConnectionFactory(this.brokerUrl, this.brokerUserName,
this.brokerPassword);

}

-----

value of broker.url in application.properties is

broker.url=
(tcp://jms-master-0:61616,tcp://jms-master1-0:61616,tcp://jms-master2-0:61616,tcp://jms-slave-0:61616,tcp://jms-slave1-0:61616,tcp://jms-slave2-0:61616)?ha=true&retryInterval=100&retryIntervalMultiplier=1.0&reconnectAttempts=-1


Also, I have added following line to "<address-setting match="#">"

<redistribution-delay>0</redistribution-delay>


My expectation was, all messages on exampleQueue from other nodes would get
routed to this node; where the consumer is connected. Am I missing
something here?

Regards,
Prateek Jain

--------------------------------------------------------------
EXPECTATION : Causes all troubles......
--------------------------------------------------------------

Reply via email to