activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-684) Client connection are not balanced across cluster with any load balancing policy
Date Wed, 17 Aug 2016 11:16:22 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15424309#comment-15424309
] 

ASF GitHub Bot commented on ARTEMIS-684:
----------------------------------------

GitHub user bayern39 opened a pull request:

    https://github.com/apache/activemq-artemis/pull/724

    [ARTEMIS-684] Client connection are not balanced across cluster with any load balancing
policy

    https://issues.apache.org/jira/browse/ARTEMIS-684

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bayern39/activemq-artemis Artemis-load-balancing

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/724.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #724
    
----
commit c292c494d87e0ccda8842ced0097f18b7f4933e8
Author: bayern39 <mchen@redhat.com>
Date:   2016-08-17T10:44:37Z

    [ARTEMIS-684] Client connection are not balanced across cluster with any load balancing
policy

commit 129c02ee5742f2d9bd075e10027d5739cc99ba1e
Author: bayern39 <mchen@redhat.com>
Date:   2016-08-17T11:06:27Z

    fixing typos

----


> Client connection are not balanced across cluster with any load balancing policy
> --------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-684
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-684
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Chen Maoqian
>            Priority: Critical
>
> * Start two EAP instances with configuration attached to this JIRA as a {{standalone-full-ha.xml}}
file.
> * Unzip simple reproducer attached as a {{connection-balancing-reproducer.zip}}. It is
simple maven project, only slightly adjusted helloword jms quickstart. There are 100 producers,
each send 1000 messages to queue with 5 second delay between sends.
> * Run reproducer and open CLI for both servers
> * In CLI switch to {{/subsystem=messaging-activemq/server=default}} and invoke {{:list-connection-ids}}
on both servers
> *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
(v6.3.4#6332)

Mime
View raw message