<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    clustering problem with JBoss Messaging in JBoss 5.1
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/niteshmehta">Nitesh Mehta</a> in <i>JBoss Messaging Development</i> - <a href="https://community.jboss.org/message/776085#776085">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">We have a cluster environment with two nodes (Node1 and Node2) of JBoss 5.1. We have two queues deployed.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">When we bring up the Node1 and view consumer count of queue in admin-console it shows consumer count as 1 for each queue. Till now everything fine and work as expected.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">When we bring up the Node2 of cluster and view consumer count of queues in admin-console of both the node, we observe a random behavior sometime consumer count is incremented to 2 on Node1 whereas&#160; consumer count stays 0 on Node 2 and some time it is increase to 1 on Node2.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">When we have consumers for queues on both the node i.e.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node1 Queue1 consumer count =1</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node1 Queue2 consumer count =1</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node2 Queue1 consumer count=1</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node2 Queue2 consumer count=1</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Everything work as expected</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">BUT</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">When we have a situation like</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node1 Queue1 consumer count =2</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node1 Queue2 consumer count =1</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node2 Queue1 consumer count=0</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Node2 Queue2 consumer count=1</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">Then all the messages which reach Node2 Queue1 are not processed.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">When one of the nodes goes down these failover happens and these messages get processed</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">This situation is happening very often.</span></p><p><span style="font-size: 10pt; font-family: Arial, sans-serif;">We tried to upgrade to JBoss Messaging 1.4.5 and JBossRemoting&#160; 2.5.2.SP3&#160;&#160; but it didn&rsquo;t help.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml">messaging-service.xml

<span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>


<span class="jive-xml-comment"><span>&lt;!--
&#160;&#160;&#160;&#160; The JBoss Messaging service deployment descriptor.


&#160;&#160;&#160;&#160; $Id: messaging-service.xml 85945 2009-03-16 19:45:12Z </span><a class="jive-link-email-small" href="mailto:dimitris@jboss.org" target="_blank">dimitris@jboss.org</a><span> $
 --&gt;


</span><span class="jive-xml-tag">&lt;server&gt;</span>


&#160;&#160; &lt;!-- ServerPeer MBean configuration
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ============================== --&gt;


&#160;&#160; <span class="jive-xml-tag">&lt;mbean code="org.jboss.jms.server.ServerPeer"
&#160;&#160;&#160;&#160;&#160; name="jboss.messaging:service=ServerPeer"
&#160;&#160;&#160;&#160;&#160; xmbean-dd="xmdesc/ServerPeer-xmbean.xml"&gt;</span>


&#160;&#160;&#160;&#160;&#160; &lt;!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer --&gt;


&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="ServerPeerID"&gt;</span>${jboss.messaging.ServerPeerID:0}<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default JNDI context to use for queues when they are deployed without specifying one --&gt; 
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultQueueJNDIContext"&gt;</span>/queue<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default JNDI context to use for topics when they are deployed without specifying one --&gt; 
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultTopicJNDIContext"&gt;</span>/topic<span class="jive-xml-tag">&lt;/attribute&gt;</span>


&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="PostOffice"&gt;</span>jboss.messaging:service=PostOffice<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default Dead Letter Queue (DLQ) to use for destinations.
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This can be overridden on a per destinatin basis --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultDLQ"&gt;</span>jboss.messaging.destination:service=Queue,name=DLQ<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This can be overridden on a per destinatin basis --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultMaxDeliveryAttempts"&gt;</span>10<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultExpiryQueue"&gt;</span>jboss.messaging.destination:service=Queue,name=ExpiryQueue<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The default redelivery delay to impose. This can be overridden on a per destination basis --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultRedeliveryDelay"&gt;</span>10000<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The periodicity of the message counter manager enquiring on queues for statistics --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="MessageCounterSamplePeriod"&gt;</span>5000<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The maximum amount of time for a client to wait for failover to start on the server side after
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; it has detected failure --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="FailoverStartTimeout"&gt;</span>60000<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The maximum amount of time for a client to wait for failover to complete on the server side after
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; it has detected failure --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="FailoverCompleteTimeout"&gt;</span>300000<span class="jive-xml-tag">&lt;/attribute&gt;</span>


&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="StrictTck"&gt;</span>false<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The maximum number of days results to maintain in the message counter history --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultMessageCounterHistoryDayLimit"&gt;</span>-1<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The name of the connection factory to use for creating connections between nodes to pull messages --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="ClusterPullConnectionFactoryName"&gt;</span>jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; by a particular consumer from a particular producer? --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="DefaultPreserveOrdering"&gt;</span>false<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="RecoverDeliveriesTimeout"&gt;</span>300000<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- Set to true to enable message counters that can be viewed via JMX --&gt;
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="EnableMessageCounters"&gt;</span>false<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="SuckerPassword"&gt;</span>${queues.database.password}<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; &lt;!-- The name of the server aspects configuration resource
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="ServerAopConfig"&gt;</span>aop/jboss-aop-messaging-server.xml<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; --&gt;
&#160;&#160;&#160;&#160;&#160; &lt;!-- The name of the client aspects configuration resource
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;attribute name="ClientAopConfig"&gt;</span>aop/jboss-aop-messaging-client.xml<span class="jive-xml-tag">&lt;/attribute&gt;</span>
&#160;&#160;&#160;&#160;&#160; --&gt;</span>


&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;depends optional-attribute-name="PersistenceManager"&gt;</span>jboss.messaging:service=PersistenceManager<span class="jive-xml-tag">&lt;/depends&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;depends optional-attribute-name="JMSUserManager"&gt;</span>jboss.messaging:service=JMSUserManager<span class="jive-xml-tag">&lt;/depends&gt;</span>
&#160;&#160;&#160;&#160;&#160; 
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;depends&gt;</span>jboss.messaging:service=Connector,transport=bisocket<span class="jive-xml-tag">&lt;/depends&gt;</span>
&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;depends optional-attribute-name="SecurityStore"
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; proxy-type="org.jboss.jms.server.SecurityStore"&gt;</span>jboss.messaging:service=SecurityStore<span class="jive-xml-tag">&lt;/depends&gt;</span>
&#160;&#160; <span class="jive-xml-tag">&lt;/mbean&gt;</span>


<span class="jive-xml-tag">&lt;/server&gt;</span>
</code></pre></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/776085#776085">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Messaging Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2043">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>