jbossjmsnettyhornetq

JBoss EAP 6.4.2 is not listening from multiple remote servers


I am having a problem setting MDB to listen to multiple remote servers on JBoss EAP 6.4.2 with Windows OS. When I set 2 servers to listen on connectionParameters it's getting messages from only one of them.

If I set only one server to listen it works well. But can't listen to 2 or more server at the same time. following is my MDB

@MessageDriven(mappedName = "TestTopicRemote", activationConfig = {   
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),  
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "cacheTopic"),  
        @ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory,org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"),          
        @ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=172.16.116.32;port=5445,host=172.16.116.107;port=5445"),
        @ActivationConfigProperty(propertyName = "user", propertyValue = "guest"),
        @ActivationConfigProperty(propertyName = "password", propertyValue = "password1")}
)

Solution

  • I believe you have misunderstood the functionality provided by the connectionParameters activation configuration property and MDB functionality in general. A JMS MDB in JBoss EAP cannot directly receive messages from multiple brokers.

    The connectionParameters activation configuration property supports multiple entries, but only one will actually be used. Typically the entries are for all the servers in a cluster or the master & slave of an HA pair.

    Are the Artemis brokers running on 172.16.116.32 and 172.16.116.107 part of a cluster? If so, consumers connecting to any node in the cluster should be able to receive messages produced to any other node in the cluster assuming the brokers in the cluster have the appropriate configuration.