activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Parsons (JIRA)" <>
Subject [jira] [Commented] (AMQ-4812) Rebalance not working on 5.8.0
Date Fri, 15 Nov 2013 16:39:21 GMT


Sam Parsons commented on AMQ-4812:

I've experienced the same issue. Looking at the code, in doReconnect()
it does this:

                     if (doRebalance) {
                         if (connectedToPriority || compareURIs(connectList.get(0), connectedTransportURI))
                             // already connected to first in the list, no need to rebalance
                             doRebalance = false;
                             return false;
                        } else {

So if your client is connected to the first broker in the list then it is never rebalanced.

Additionally, when a new broker is added to the network, it is appended to the end of the
list. This means that everything on the first broker stays connected, everything else is rebalanced
(possibly to the first broker). Now if you add another broker, everything gets rebalanced
except clients connected to the first broker, which just receives more connections.

In my opinion that check should be removed, because it results in uneven rebalancing across
a broker network.

> Rebalance not working on 5.8.0
> ------------------------------
>                 Key: AMQ-4812
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 5.8.0
>            Reporter: Wayne Evans
>         Attachments: (Example), Broker1_activemq.xml, Broker2_activemq.xml
> Two brokers networked.
> Transport connectors configured on both with:
> rebalanceClusterClients="true" updateClusterClients="true" updateClusterClientsOnRemove="true"
> Clients configured with only Broker 1 in Failover string.
> Clients all connect to 1st Broker when starting up.
> When first broker is stopped all clients fail over to 2nd Broker.
> When 1st Broker is brought back up all clients remain on 2nd Broker.
> Config files from both Brokers and one sample client config attached.
> Related issue - queued messages on 1st Broker that were passed from 2nd broker initially
are not consumed after 1st Broker is brought back up as rules prevent them from being passed
back to 2nd Broker where client consumers are attached.

This message was sent by Atlassian JIRA

View raw message