3 Replies Latest reply on Feb 23, 2011 9:30 PM by schipperde

    Messages get stuck in queues with JBoss Messaging cluster setup


      We have an application that uses queues to connect different components. All the queues sit on a JMS server with their producers and consumers on remote servers. It works fine when we have just one JMS server. Now we want to create a cluster of JMS servers for load balancing and fail over. JBoss Clustering is successfully working. However, messages always get stuck in the queues, also it seems to be random on which queue they get stuck in.


      Here is our setup:

      - two JMS servers A & B, JBoss AS 5.1.0.GA with JBoss Messaging 1.4.3.GA

      - Unique jboss.messaging.ServerPeerID per node (1 and 2 respectively)

      - Both servers have queues deployed in farm, with Clustered=true

      - Singleton consumer for each queue with message selector, it connects to the queue with the clustered JNDI port (A:1100,B:1100)

      - Clustered connection factory is used, with supportsFailOver, supportsLoadBalancing both set to true.

      - Based on https://issues.jboss.org/browse/JBMESSAGING-1713, added in the dependency on the ConnectionFactory for ClusterPullConnectionFactory on JMS servers so that message sucker is enabled to pull messages from one JMS server to another


      Also, we found that the consistent way to get around this issue is just to shut down one JMS server, all the stuck messages will be failed over to the other server and get processed fine.


      After reading this article ((http://community.jboss.org/wiki/JBMCluster), especially the last two notes in the article, my understanding is that our scenario cannot be achieved with JBoss messaging cluster since our singleton consumer may not be able to get all the qualified messages from remote server. Am I understanding it correctly? I have been digging this issue for quite a while, any suggestions and clarification would be greatly appreciated. Thanks!!

        • 1. Messages get stuck in queues with JBoss Messaging cluster setup

          My expectation is that a remote client must process all messages. I understand the nodes that a local (e.g. MDB) will see only the local queue, but this might be ok because other nodes will have its own MDB-Queue combination.


          But you make me thoughtfully and getting doubts about

          • 2. Re: Messages get stuck in queues with JBoss Messaging cluster setup

            Thanks Wolf-Dieter. But as Yanyan points out, we only have one consumer (across both local queues in the cluster), not one consumer per queue, which seems to be the scenario for which jboss messaging was designed, based on the JBMCluster wiki page above.


            I suppose the question really is: was jboss messaging ever designed to work correctly with one consumer and multiple clustered queues? (ie. where the consumer is able to receive all messages, from both queues, with only a single JMS connection)


            It would be helpful to know for certain whether we are attempting to chase after a goal that is unattainable, rather than it just being a matter of not figuring out the correct configuration yet. Yanyan and I have spent about 6 full days or so trying to get this working, trying many many different configurations and reading just about every piece of related documentation available on the web.


            Can anyone answer this question (about the intended design/purpose of JBM) with finality?

            • 3. Messages get stuck in queues with JBoss Messaging cluster setup

              Hi Mike,


              I am encountering the same issue here: a single consumer to multiple clustered queues. Have you figured out the issue yet?