You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2018/01/22 21:07:00 UTC

[jira] [Closed] (ARTEMIS-557) Client connection are not balanced across cluster with RandomConnectionLoadBalancingPolicy

     [ https://issues.apache.org/jira/browse/ARTEMIS-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram closed ARTEMIS-557.
----------------------------------
    Resolution: Not A Bug

Questions like this should be directed to the [ActiveMQ User list|http://activemq.apache.org/mailing-lists.html].  JIRA is typically reserved for confirmed issues.  Thanks!

> Client connection are not balanced across cluster with RandomConnectionLoadBalancingPolicy
> ------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-557
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-557
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>            Reporter: Martin Styk
>            Priority: Major
>
> *Scenario*
> There two nodes in cluster. Nodes in cluster are connected and both nodes have same jms destinations and connection factory defined like the following one
> {noformat}
>  <connection-factory name="RemoteConnectionFactory" connectors="http-connector" entries="java:jboss/exported/jms/RemoteConnectionFactory" ha="true" connection-ttl="120000" call-timeout="60000" block-on-acknowledge="true" retry-interval="1000" reconnect-attempts="-1" connection-load-balancing-policy-class-name="org.apache.activemq.artemis.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy"/>
> {noformat}
> There are clients connecting to cluster. With _RandomConnectionLoadBalancingPolicy_, I would expect that connections are randomly distributed among the nodes in cluster. However, when I list connections on both nodes (/subsystem=messaging-activemq/server=default:list-connection-ids), all connections are on one server. 
> Method {{private TransportConfiguration selectConnector()}} in class {{ServerLocatorImpl}} checks whether the {{topologyArray}} is null and makes decision between choosing connector to other node in topology or initial connector of connection factory. In method {{private TransportConfiguration selectConnector()}}  {{topologyArray}} is still null, so clients make connection using initial connector. It seems like {{topologyArray}} is only updated during {{notifyNodeUp/Down}} methods.
> Could you please explain how is this client connection balancing supposed to work?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)