Connection Re-balance Question

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Connection Re-balance Question

joesmithcomm
Hi,

I'm using the 5.4.x transport's updateClusterClients="true"
rebalanceClusterClients="true"  options.


It works fine as a broker is added to the cluster - the existing connections are
rebalanced.


When a broker that's already in the cluster when down, the connections failed
over successfully to the other broker (clients are using failover://).  However,
when I bring up the failed broker, the connections on the other broker are not
re-balanced.

My questions are:

1. Does connection re-balancing work in this scenario - where a known broker in
the cluster comes back on line after a crash?

2. What criteria need to be met before re-balance would occur other than when a
NEW (vs. existing) broker is added to the cluster?  E.g. we have only 24 client
connections, is that too low?

We tried both 5.4.1 and 5.4.2. Linux. JVM is 1.6.

Thanks for the help.


     
Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

joesmithcomm
Attachment.



From: Joe Smith <[hidden email]>
To: [hidden email]
Sent: Fri, February 25, 2011 5:14:51 PM
Subject: Connection Re-balance Question

Hi,

I'm using the 5.4.x transport's updateClusterClients="true"
rebalanceClusterClients="true"  options.


It works fine as a broker is added to the cluster - the existing connections are
rebalanced.


When a broker that's already in the cluster when down, the connections failed
over successfully to the other broker (clients are using failover://).  However,
when I bring up the failed broker, the connections on the other broker are not
re-balanced.

My questions are:

1. Does connection re-balancing work in this scenario - where a known broker in
the cluster comes back on line after a crash?

2. What criteria need to be met before re-balance would occur other than when a
NEW (vs. existing) broker is added to the cluster?  E.g. we have only 24 client
connections, is that too low?

We tried both 5.4.1 and 5.4.2. Linux. JVM is 1.6.

Thanks for the help.


     

Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

joesmithcomm
try attachment again....



From: Joe Smith <[hidden email]>
To: [hidden email]
Sent: Fri, February 25, 2011 5:22:04 PM
Subject: Re: Connection Re-balance Question

Attachment.



From: Joe Smith <[hidden email]>
To: [hidden email]
Sent: Fri, February 25, 2011 5:14:51 PM
Subject: Connection Re-balance Question

Hi,

I'm using the 5.4.x transport's updateClusterClients="true"
rebalanceClusterClients="true"  options.


It works fine as a broker is added to the cluster - the existing connections are
rebalanced.


When a broker that's already in the cluster when down, the connections failed
over successfully to the other broker (clients are using failover://).  However,
when I bring up the failed broker, the connections on the other broker are not
re-balanced.

My questions are:

1. Does connection re-balancing work in this scenario - where a known broker in
the cluster comes back on line after a crash?

2. What criteria need to be met before re-balance would occur other than when a
NEW (vs. existing) broker is added to the cluster?  E.g. we have only 24 client
connections, is that too low?

We tried both 5.4.1 and 5.4.2. Linux. JVM is 1.6.

Thanks for the help.


     


Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

gtully
In reply to this post by joesmithcomm
Just had a peek at the code[1], you need to add
updateClusterClientsOnRemove="true" to your transport connector.

It looks like the cluster info is not aware of the broker failure
(node removal) and as a result does not update then it joins again.

org.apache.activemq.broker.region.RegionBroker#removeBrokerInClusterUpdate
[1] http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?view=markup


On 25 February 2011 22:14, Joe Smith <[hidden email]> wrote:

> Hi,
>
> I'm using the 5.4.x transport's updateClusterClients="true"
> rebalanceClusterClients="true"  options.
>
>
> It works fine as a broker is added to the cluster - the existing connections are
> rebalanced.
>
>
> When a broker that's already in the cluster when down, the connections failed
> over successfully to the other broker (clients are using failover://).  However,
> when I bring up the failed broker, the connections on the other broker are not
> re-balanced.
>
> My questions are:
>
> 1. Does connection re-balancing work in this scenario - where a known broker in
> the cluster comes back on line after a crash?
>
> 2. What criteria need to be met before re-balance would occur other than when a
> NEW (vs. existing) broker is added to the cluster?  E.g. we have only 24 client
> connections, is that too low?
>
> We tried both 5.4.1 and 5.4.2. Linux. JVM is 1.6.
>
> Thanks for the help.
>
>
>



--
http://blog.garytully.com
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

For a particular Queue Consumer is not receiving messages : Is this any Issue with ActiveMQ - 5.2.0

nnprasad
Hi,

ActiveMQ 5.2.0 - PERSISTENT MODE, Windows 2003 Server, Oracle 10

I have successful simple producer and consumer programs I always use for my test.(FYI: I can configure it to change No.Of Producers, No.of Consumers, and No.of Messages)

In our application, developers reporting to me of a particular job that it is not getting 2 paticular messages from activeMQ to complete the Job Process.
Not always but some times.

I saw them pending in ActiveMQ Admin Pages - queue browser.

First test run:

I sent a simple text message "NNP Message" to that same queue, and my consumer is waiting to receive them
Whereas Queue browser is showing them as sent and received but no pending.

Program Output:
        Connection Established :: ID:DWD51075520-3438-1298909628155-1:1

        ActiveMQ Machine : tcp://DWDAPPP05PW:63616
        ActiveMQ Queue : UIMJobQueuePreProdTax
        I AM  :: Thread-5

        Consumer STARTED
        Sending Message - 1
        Sending Message - 2
        Sending Message - 3

Second test run:

Same Program, Same Active MQ, But I sent to "different queue" now. Successfully Received those Messages

        Connection Established :: ID:DWD51075520-3767-1298911642514-1:1

        ActiveMQ Machine : tcp://DWDAPPP05PW:63616
        ActiveMQ Queue : TestTestTestQ

        I AM  :: Thread-5

        Consumer STARTED
        Sending Message - 1
        Sending Message - 2

        FOUND SOME MESSAGE - 1

        I AM ::Thread-7   Received NNP Message - 1

        FOUND SOME MESSAGE - 1

        I AM ::Thread-7   Received NNP Message - 2

        FOUND SOME MESSAGE - 1

        I AM ::Thread-7   Received NNP Message - 3
        Sending Message - 3


This is really giving us a big problem, as that job is very crucial to be completed in time, and due to this problem it is keep on waiting.

I can not suspect their consumer program OR their JMS type of that message, as the same thing is happening to my message and program.

I am attaching the ActiveMQ Log snippet, My Testing Programs, Please analyse it and help me, I am clue less and very urgent.


Thank You,
Nageswara P Nakarikanti.
Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

joesmithcomm
In reply to this post by gtully
Hi Gary,

Thanks for the reply.  I've tried to attach the activemq.xml - for some reason
it's been filtered out.  I do have the updateClusterClientsOnRemove="true"
attribute on the transport connector.  Sorry I did not list it in the original
email.

Here is the snippet.

Broker 1:

<networkConnector uri="static://(tcp://host2name:62616)"  
conduitSubscriptions="false"/>

<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"
updateClusterClients="true" rebalanceClusterClients="true"
updateClusterClientsOnRemove="true"/>


Broker 2:

<networkConnector uri="static://(tcp://host1name:61616)"  
conduitSubscriptions="false"/>

<transportConnector name="openwire" uri="tcp://0.0.0.0:62616"
updateClusterClients="true" rebalanceClusterClients="true"
updateClusterClientsOnRemove="true"/>

Will take a look with the code.  Not sure which module triggers the re-balance.

Thanks, again




________________________________
From: Gary Tully <[hidden email]>
To: [hidden email]
Sent: Mon, February 28, 2011 7:28:49 AM
Subject: Re: Connection Re-balance Question

Just had a peek at the code[1], you need to add
updateClusterClientsOnRemove="true" to your transport connector.

It looks like the cluster info is not aware of the broker failure
(node removal) and as a result does not update then it joins again.

org.apache.activemq.broker.region.RegionBroker#removeBrokerInClusterUpdate
[1]
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java?view=markup



On 25 February 2011 22:14, Joe Smith <[hidden email]> wrote:

> Hi,
>
> I'm using the 5.4.x transport's updateClusterClients="true"
> rebalanceClusterClients="true"  options.
>
>
> It works fine as a broker is added to the cluster - the existing connections
>are
> rebalanced.
>
>
> When a broker that's already in the cluster when down, the connections failed
> over successfully to the other broker (clients are using failover://).
> However,
> when I bring up the failed broker, the connections on the other broker are not
> re-balanced.
>
> My questions are:
>
> 1. Does connection re-balancing work in this scenario - where a known broker
in
> the cluster comes back on line after a crash?
>
> 2. What criteria need to be met before re-balance would occur other than when
a
> NEW (vs. existing) broker is added to the cluster?  E.g. we have only 24
client
> connections, is that too low?
>
> We tried both 5.4.1 and 5.4.2. Linux. JVM is 1.6.
>
> Thanks for the help.
>
>
>



--
http://blog.garytully.com
http://fusesource.com


Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

joesmithcomm
In reply to this post by joesmithcomm
Hi Gary,

Somehow another message got inserted into this thread, and my last post was not showing up properly.  Excuse me for re-posting it again here.  Hope you and others can shed some light on this issues...

Thanks

---- repost below ----

Hi Gary,

Thanks for the reply.  I've tried to attach the activemq.xml - for some reason
it's been filtered out.  I do have the updateClusterClientsOnRemove="true"
attribute on the transport connector.  Sorry I did not list it in the original
email.

Here is the snippet.

Broker 1:

<networkConnector uri="static://(tcp://host2name:62616)"  
conduitSubscriptions="false"/>

<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"
updateClusterClients="true" rebalanceClusterClients="true"
updateClusterClientsOnRemove="true"/>


Broker 2:

<networkConnector uri="static://(tcp://host1name:61616)"  
conduitSubscriptions="false"/>

<transportConnector name="openwire" uri="tcp://0.0.0.0:62616"
updateClusterClients="true" rebalanceClusterClients="true"
updateClusterClientsOnRemove="true"/>

Will take a look with the code.  Not sure which module triggers the re-balance.

Thanks, again
Reply | Threaded
Open this post in threaded view
|

Re: Connection Re-balance Question

Bodhayan Chakraborty
Hi Joe,

I am having the same problem with AMQ 5.4.2. When an existing broker dies, the existing connections are reconnected to other brokers in the cluster. But when the broker comes up, I see messages are being published to that broker but not consumed anymore.

Have you got any fix for this? Please let me know.

Thanks,
Bodhayan.