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

    Non clustered Queue

      Hi,

      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?

      Regards
      Shenaz

        • 1. Re: Non clustered Queue
          brian.stansberry

          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


            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.

            Regards
            Shenaz

            • 3. Re: Non clustered Queue
              brian.stansberry

              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
                dimitarn

                Hi

                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?

                 

                [CODE]

                <mbean code="org.jboss.jms.server.destination.QueueService"
                        name="jboss.messaging.destination:service=Queue,name=MyDurableQueue"
                        xmbean-dd="xmdesc/Queue-xmbean.xml">
                        <attribute name="JNDIName">queue/MyDurableQueue
                        </attribute>
                        <depends optional-attribute-name="ServerPeer">
                            jboss.messaging:service=ServerPeer</depends>
                        <depends>jboss.messaging:service=PostOffice
                        </depends>
                        <attribute name="Clustered">false</attribute>
                    </mbean>

                [/CODE]

                Here is how i am sending object message;

                [CODE]

                        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); 

                        sender.send(createMessage(obj));

                [/CODE]

                • 5. Re: Non clustered Queue
                  jaikiran

                  dimitar,

                   

                  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