message stuck in clustered queue
schipperde Mar 10, 2011 4:04 AMHi, I'm using JBoss AS 5.1 with messaging 1.4.3 to do clustering. My setup is 2 JBoss nodes (A & B) with 2 standalone applications pointing to the nodes separately. The problem is sometimes the nodes will have 1 consumer each, and the messages can be received correctly, but sometimes both consumers will camp at node A or B only, and messages sent to the other node will not be consumed. I ran the distributed-queue example and it works fine though.
I have configured my setup as below:
connection-factories-service.xml
<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
name="jboss.messaging.connectionfactory:service=ClusteredConnectionFactory"
xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
<attribute name="SupportsFailover">true</attribute>
<attribute name="SupportsLoadBalancing">true</attribute>
<attribute name="DisableRemotingChecks">true</attribute>
<attribute name="LoadBalancingFactory">org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory</attribute>
messaging-service.xml
<attribute name="ClusterPullConnectionFactoryName">jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory</attribute>
mysql-persistence-service.xml
<attribute name="Clustered">true</attribute>
<attribute name="FailoverOnNodeLeave">true</attribute>
my-destinations-service.xml
<attribute name="Clustered">true</attribute>
Another problem is when the 2 consumers are at node A and the message is stuck at node B, after shutting down node B (either through ctrl-c or closing the window), the message does not failover to node A, even though on the console it says
[ INFO][org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.info():296] JBoss Messaging is failing over for failed node 1. If there are many messages to reload this may take some time...
[ INFO][org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.info():296] JBoss Messaging failover completed
Appreciate if anyone can help to answer my question. Thanks.