5 Replies Latest reply on Feb 25, 2010 8:51 AM by jaikiran pai

    Non clustered Queue

    Shenaz Assu Newbie


      We are using Jboss 4 AS in clustered mode. From the docs that I've read, its understood that JMS queues and topics are implemented as singleton service in a clustered environment. Is it possible to have non clustered queues? i.e., each local queues on node in the cluster?


        • 1. Re: Non clustered Queue
          Brian Stansberry Master

          Should be possible, yeah.

          I haven't tried this myself, so beware, test carefully, be prepared for possible bumps in the road etc.

          But you should be able to:

          1) Remove the server/all/deploy-hasingleton/jms folder
          2) Replace the contents of server/all/deploy/jms with those from server/default/deploy/jms

          The key thing here, is the JMS server is no longer a singleton -- each AS instance is running a JMS server. That means you need to configure them so they aren't all trying to persist to the same place in your DB. Each needs to write to a separate catalog (in a shared db) or each to its own db.

          • 2. Re: Non clustered Queue
            Shenaz Assu Newbie

            Hi Brian,

            Thanks a ton for the reply.

            One more doubt. Is it possible to have a combination of singleton and non singleton queues in the clustered environment?

            Our requirement is to have just one of the queues as non-clustered and all other queues as normal singleton queues.


            • 3. Re: Non clustered Queue
              Brian Stansberry Master

              That should be doable. What I described before was focused on the JMS server. And with it you have a server running on every node. The queue is independent; it can be deployed via deploy-hasingleton and that will work as long as there is a JMS server running on its node. Which there will be.

              Hmm, big problem. The problem is to connect to that singleton queue, a remote client running would need to figure out which AS instance has the queue, and lookup the connection factory and queue from that AS. When you use the regular singleton JMS server approach, you just look things up using HA-JNDI and HA-JNDI finds the one node that has the connection factory and queue deployed. That won't work if you have a connection factory deployed everywhere. To get this to work you'd need to come up with some fancy integration of your own.

              • 4. Re: Non clustered Queue
                dimitar dimitar Newbie


                I have jboss not clustered queue. When i deploy it in default or all deploy folder it does not seams to work, does not send any messages to the MDB. No exception is thrown.

                When i deploy it with clustered = true in the all directory it works, in the default throws deployment error.


                So how can i have not clustered queue working?



                <mbean code="org.jboss.jms.server.destination.QueueService"
                        <attribute name="JNDIName">queue/MyDurableQueue
                        <depends optional-attribute-name="ServerPeer">
                        <attribute name="Clustered">false</attribute>


                Here is how i am sending object message;


                        qFactory = (QueueConnectionFactory) getCtx().lookup("CF");
                        queueConnection = qFactory.createQueueConnection();
                        queueSession = queueConnection.createQueueSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);       
                        queue = (Queue) getCtx().lookup("queue/" + getQueueName()); //queueSession.createQueue(getQueueName());
                        sender = queueSession.createSender(queue); 



                • 5. Re: Non clustered Queue
                  jaikiran pai Master



                  You have asked the same question (or different variants of the same question) in multiple forums and different topics. Please do not do that. It just creates confusion and leads to duplicate discussions. Let's continue the discussion in this thread instead http://community.jboss.org/message/528202#528202