<!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  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;"> </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;"> </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;"> </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  2.5.2.SP3   but it didn’t help.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml">messaging-service.xml
<span class="jive-xml-tag"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="jive-xml-comment"><span><!--
     The JBoss Messaging service deployment descriptor.
     $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> $
-->
</span><span class="jive-xml-tag"><server></span>
   <!-- ServerPeer MBean configuration
        ============================== -->
   <span class="jive-xml-tag"><mbean code="org.jboss.jms.server.ServerPeer"
      name="jboss.messaging:service=ServerPeer"
      xmbean-dd="xmdesc/ServerPeer-xmbean.xml"></span>
      <!-- The unique id of the server peer - in a cluster each node MUST have a unique value - must be an integer -->
      <span class="jive-xml-tag"><attribute name="ServerPeerID"></span>${jboss.messaging.ServerPeerID:0}<span class="jive-xml-tag"></attribute></span>
     
      <!-- The default JNDI context to use for queues when they are deployed without specifying one -->
     
      <span class="jive-xml-tag"><attribute name="DefaultQueueJNDIContext"></span>/queue<span class="jive-xml-tag"></attribute></span>
     
      <!-- The default JNDI context to use for topics when they are deployed without specifying one -->
     
      <span class="jive-xml-tag"><attribute name="DefaultTopicJNDIContext"></span>/topic<span class="jive-xml-tag"></attribute></span>
            <span class="jive-xml-tag"><attribute name="PostOffice"></span>jboss.messaging:service=PostOffice<span class="jive-xml-tag"></attribute></span>
           
      <!-- The default Dead Letter Queue (DLQ) to use for destinations.
           This can be overridden on a per destinatin basis -->
     
      <span class="jive-xml-tag"><attribute name="DefaultDLQ"></span>jboss.messaging.destination:service=Queue,name=DLQ<span class="jive-xml-tag"></attribute></span>
     
      <!-- The default maximum number of times to attempt delivery of a message before sending to the DLQ (if configured).
           This can be overridden on a per destinatin basis -->
     
      <span class="jive-xml-tag"><attribute name="DefaultMaxDeliveryAttempts"></span>10<span class="jive-xml-tag"></attribute></span>
     
      <!-- The default Expiry Queue to use for destinations. This can be overridden on a per destinatin basis -->
     
      <span class="jive-xml-tag"><attribute name="DefaultExpiryQueue"></span>jboss.messaging.destination:service=Queue,name=ExpiryQueue<span class="jive-xml-tag"></attribute></span>
     
      <!-- The default redelivery delay to impose. This can be overridden on a per destination basis -->
     
      <span class="jive-xml-tag"><attribute name="DefaultRedeliveryDelay"></span>10000<span class="jive-xml-tag"></attribute></span>
     
      <!-- The periodicity of the message counter manager enquiring on queues for statistics -->
     
      <span class="jive-xml-tag"><attribute name="MessageCounterSamplePeriod"></span>5000<span class="jive-xml-tag"></attribute></span>
     
      <!-- The maximum amount of time for a client to wait for failover to start on the server side after
           it has detected failure -->
     
      <span class="jive-xml-tag"><attribute name="FailoverStartTimeout"></span>60000<span class="jive-xml-tag"></attribute></span>
     
      <!-- The maximum amount of time for a client to wait for failover to complete on the server side after
           it has detected failure -->
     
      <span class="jive-xml-tag"><attribute name="FailoverCompleteTimeout"></span>300000<span class="jive-xml-tag"></attribute></span>
      <span class="jive-xml-tag"><attribute name="StrictTck"></span>false<span class="jive-xml-tag"></attribute></span>
     
      <!-- The maximum number of days results to maintain in the message counter history -->
     
      <span class="jive-xml-tag"><attribute name="DefaultMessageCounterHistoryDayLimit"></span>-1<span class="jive-xml-tag"></attribute></span>
     
      <!-- The name of the connection factory to use for creating connections between nodes to pull messages -->
     
      <span class="jive-xml-tag"><attribute name="ClusterPullConnectionFactoryName"></span>jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory<span class="jive-xml-tag"></attribute></span>
     
      <!-- When redistributing messages in the cluster. Do we need to preserve the order of messages received
            by a particular consumer from a particular producer? -->
           
      <span class="jive-xml-tag"><attribute name="DefaultPreserveOrdering"></span>false<span class="jive-xml-tag"></attribute></span>
     
      <!-- Max. time to hold previously delivered messages back waiting for clients to reconnect after failover -->
     
      <span class="jive-xml-tag"><attribute name="RecoverDeliveriesTimeout"></span>300000<span class="jive-xml-tag"></attribute></span>
     
      <!-- Set to true to enable message counters that can be viewed via JMX -->
     
      <span class="jive-xml-tag"><attribute name="EnableMessageCounters"></span>false<span class="jive-xml-tag"></attribute></span>
     
      <span class="jive-xml-tag"><attribute name="SuckerPassword"></span>${queues.database.password}<span class="jive-xml-tag"></attribute></span>
     
      <!-- The name of the server aspects configuration resource
      <span class="jive-xml-tag"><attribute name="ServerAopConfig"></span>aop/jboss-aop-messaging-server.xml<span class="jive-xml-tag"></attribute></span>
      -->
      <!-- The name of the client aspects configuration resource
        <span class="jive-xml-tag"><attribute name="ClientAopConfig"></span>aop/jboss-aop-messaging-client.xml<span class="jive-xml-tag"></attribute></span>
      --></span>
      <span class="jive-xml-tag"><depends optional-attribute-name="PersistenceManager"></span>jboss.messaging:service=PersistenceManager<span class="jive-xml-tag"></depends></span>
     
      <span class="jive-xml-tag"><depends optional-attribute-name="JMSUserManager"></span>jboss.messaging:service=JMSUserManager<span class="jive-xml-tag"></depends></span>
     
      <span class="jive-xml-tag"><depends></span>jboss.messaging:service=Connector,transport=bisocket<span class="jive-xml-tag"></depends></span>
      <span class="jive-xml-tag"><depends optional-attribute-name="SecurityStore"
          proxy-type="org.jboss.jms.server.SecurityStore"></span>jboss.messaging:service=SecurityStore<span class="jive-xml-tag"></depends></span>
   <span class="jive-xml-tag"></mbean></span>
<span class="jive-xml-tag"></server></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>