activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbrondy <dbro...@yahoo.fr>
Subject Strange behavior using failover and network of broker
Date Thu, 08 Jul 2010 13:50:30 GMT

Hi everybody,

We are currently using ActiveMQ 5.2 application in our project and we are
glad to use this great app.

One of our java application is misbehaving while receiving and producing
message and I don't have a lot of clue to troubleshoot the problem.

In fact, we are using 4 computers to run ActiveMQ broker. The following
configuration has been implemented :

BROKER1 : 
<broker useJmx="true" persistent="false" dataDirectory="data"
brokerName="activemq" xmlns="http://activemq.apache.org/schema/core">
<networkConnectors>
<networkConnector name="NoB" networkTTL="1"
uri="static://(tcp://BROKER2:61616,tcp://BROKER3:61616,tcp://BROKER4:61616)"/>
</networkConnectors>
<transportConnectors>
<transportConnector uri="tcp://BROKER1:61616"/>
</transportConnectors>
<managementContext>
<managementContext connectorPort="1399"
jmxDomainName="org.apache.activemq"/>
</managementContext>
</broker>

BROKER2 : 
<broker useJmx="true" persistent="false" dataDirectory="data"
brokerName="activemq" xmlns="http://activemq.apache.org/schema/core">
<networkConnectors>
<networkConnector name="NoB" networkTTL="1"
uri="static://(tcp://BROKER1:61616,tcp://BROKER3:61616,tcp://BROKER4:61616)"/>
</networkConnectors>
<transportConnectors>
<transportConnector uri="tcp://BROKER2:61616"/>
</transportConnectors>
<managementContext>
<managementContext connectorPort="1399"
jmxDomainName="org.apache.activemq"/>
</managementContext>
</broker>

BROKER3 : 
<broker useJmx="true" persistent="false" dataDirectory="data"
brokerName="activemq" xmlns="http://activemq.apache.org/schema/core">
<networkConnectors>
<networkConnector name="NoB" networkTTL="1"
uri="static://(tcp://BROKER1:61616,tcp://BROKER2:61616,tcp://BROKER4:61616)"/>
</networkConnectors>
<transportConnectors>
<transportConnector uri="tcp://BROKER3:61616"/>
</transportConnectors>
<managementContext>
<managementContext connectorPort="1399"
jmxDomainName="org.apache.activemq"/>
</managementContext>
</broker>

BROKER4 : 
<broker useJmx="true" persistent="false" dataDirectory="data"
brokerName="activemq" xmlns="http://activemq.apache.org/schema/core">
<networkConnectors>
<networkConnector name="NoB" networkTTL="1"
uri="static://(tcp://BROKER1:61616,tcp://BROKER2:61616,tcp://BROKER3:61616)"/>
</networkConnectors>
<transportConnectors>
<transportConnector uri="tcp://BROKER4:61616"/>
</transportConnectors>
<managementContext>
<managementContext connectorPort="1399"
jmxDomainName="org.apache.activemq"/>
</managementContext>
</broker>

Following is the illustrated topology :
http://old.nabble.com/file/p29107245/topology.jpg 

All our applications use Topic. They publish and subscribe messages using a
TopicConnectionFactory defined as follow :
failover:(tcp://BROKER1:61616?connectionTimeout=2000&soTimeout=2000&wireFormat.maxInactivityDuration=2000,tcp://BROKER2:61616?connectionTimeout=2000&soTimeout=2000&wireFormat.maxInactivityDuration=2000,tcp://BROKER3:61616?connectionTimeout=2000&soTimeout=2000&wireFormat.maxInactivityDuration=2000,tcp://BROKER4:61616?connectionTimeout=2000&soTimeout=2000&wireFormat.maxInactivityDuration=2000)?jms.useAsyncSend=true&maxReconnectDelay=2000&backup=false&useExponentialBackOff=false&maxReconnectAttempts=2

The application causing troubles subscribes bytes messages on Topic A,
performs a dedicated processing internally and publishes object messages on
Topic B. The bytes messages posted on Topic A are created by 6 or 7
publishers. Object messages published on Topic B are also received by
different consumers. All messages used for now are NON PERSISTENT message
and all subscritions are non durable with AUTO-ACKNOWLEDGE mode.

After 3 or 4 days of normal work, the transport thread called "ActiveMQ
Transport: tcp://BROKER1/10.160.14.31:61616" starts been recreated and
connected on another broker element. More precisely, during 3 days, the
application used the BROKER1 for publish/subscribe and at a given time, the
transport thread get recreated passing randomly from one element to all
other BROKER element every 5 minutes (more or less). Remark : it never came
back connected on BROKER1. After couple of switching, I see our application
unable retaining a large amount of incoming messages which cannot be treated
in a timely maner. If we don't do anything, the application will fails in
JavaHeapSpace.

Could it be possible to get a kind of duplicated message flooding at the
time the transport get reconnected ? Is our BROKER configuration suitable
(topology and network connector definition) ? Does someone see this problem
already ?

I will really appreciate any clue, ideas or recommandation.
Tks in advance and thanks for all the great job you do.
denis

-- 
View this message in context: http://old.nabble.com/Strange-behavior-using-failover-and-network-of-broker-tp29107245p29107245.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message