What's the full use-case here?  Are you attempting to test server-side message 
load-balancing where messages sent to one node are distributed to other nodes 
in the cluster?  If so, do you have consumers on the other nodes of the cluster 
waiting to receive those messages?  You are using the ON_DEMAND load-balancing 
policy which will only load-balance messages if there is a demand (i.e. a 
consumer).

Artemis ships with examples of clustered use-cases like this where you can see 
concrete configuration details.  Perhaps one of those might help you.

Also, questions about using the broker should be sent to the user list rather 
than the dev list.


Justin

----- Original Message -----
From: "anton.mithun" <[email protected]>
To: [email protected]
Sent: Monday, August 22, 2016 4:54:51 AM
Subject: Artemis - Load balance setup

Trying to implement a load balance topology with two live servers,
tcp://localhost:61616 and tcp://localhost:61617
I am sending the message to tcp://localhost:61616.

load balance not working with the given below config. Only
tcp://localhost:61616 is receiving the message.
     <connectors>
         <connector name="netty-connector">tcp://localhost:61616</connector>
      </connectors>

      <acceptors>
         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
      </acceptors>

      <broadcast-groups>
         <broadcast-group name="bg-group1">
            <group-address>231.7.7.8</group-address>
            <group-port>9876</group-port>
            <broadcast-period>1000</broadcast-period>
            <connector-ref>netty-connector</connector-ref>
         </broadcast-group>
      </broadcast-groups>

      <discovery-groups>
         <discovery-group name="dg-group1">
            <group-address>231.7.7.8</group-address>
            <group-port>9876</group-port>
            <refresh-timeout>60000</refresh-timeout>
         </discovery-group>
      </discovery-groups>

      <cluster-connections>
         <cluster-connection name="my-cluster">
            <address>jms</address>
            <connector-ref>netty-connector</connector-ref>
            <retry-interval>500</retry-interval>
            <retry-interval-multiplier>1.0</retry-interval-multiplier>
            <max-retry-interval>5000</max-retry-interval>
            <reconnect-attempts>-1</reconnect-attempts>
            <message-load-balancing>ON_DEMAND</message-load-balancing>
            <max-hops>1</max-hops>
            <discovery-group-ref discovery-group-name="dg-group1"/>
         </cluster-connection>
      </cluster-connections>

But when I give this (acceptor defining the other server) in each
broker.xml, then the load balance works alright(round-robin)
 
      <acceptors>
         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
         <acceptor
name="netty-acceptor-61616">tcp://localhost:61617</acceptor>
      </acceptors>

So is it necessary? the dynamic addition of a new node might not be possible
then? because then i have to add acceptor element for that server in all
other brokers and restart them all ?? 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-Load-balance-setup-tp4715699.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to