1 Reply Latest reply on Dec 23, 2009 10:50 PM by Yong Hao Gao

    Problem with clustered queue on JBoss 5.1.

    Maciej Skorupka Newbie

      Hi again,


      This post is related to http://community.jboss.org/thread/146131?tstart=0  thread.


      We have two JBoss 5.1 in clustered mode (all configuration) with persistence on MySQL 5.1. We have a clustered queue there. Let me describe one scenario:


      1) There are two JBoss 5.1 running (node1 and node2) in cluster. They share the same queue (defined in destinations-service.xml on each node). We have a J2SE client that sends 5 messages to that queue. Node1 gets 3, node2 gets 2. Both are killed at the same time. Node1 gets up and sees only 3 messages. They may be received by another J2SE client, but 2 messages from node2 are still in queue and can't be consumed. If new messages are sent to that queue, node1 gets them and those new messages can be read without touching 2 from node2. When node2 gets up, it sees those 2 messages. And they may be read from it. If node2 is killed now, those two messages are now seen on node1.


      It seems, that when two nodes fail on the same time and only one gets up, there's no failover of some kind. Is it possible to change that behavior by some configuration? Details of our configuration are described in above mentioned thread. The only difference is in destinations-service.xml which looks like this:


      <mbean code="org.jboss.jms.server.destination.QueueService"
          <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
          <attribute name="Clustered">true</attribute>
          <attribute name="SecurityConfig">
                  <role name="ecm-role" write="true" />
                  <role name="prm-role" read="true" />



      I'd really appreciate some help on this,


      Thanks in advance.

        • 1. Re: Problem with clustered queue on JBoss 5.1.
          Yong Hao Gao Master

          If two nodes are killed at the same time, they have no chance to do failover, so messages stay with their own node. If node 1 is started up again, it only loads its messages and won't touch the other node's. It's understandable because node1 has no way to know the status of node 2 and therefore cannot justify for a failover from it.

          The failover can happens only when a live node receives member lost event. So if all the nodes in a cluster crashed at the same time, it's not possible for the failover to happen.