6 Replies Latest reply on Sep 23, 2010 1:23 AM by balrajk

    High Availability Setup of HornetQ with JBoss in Cluster

    balrajk

      Hello,

       

      I have a doubt related to consuming messages from a queue in High Availability mode and the HornetQ servers are setup in a cluster.

       

      I have an active and stand-by instances of HornetQ (2.1.1) running in JBoss (5.1) and a MDB running on a different instance listening on the queue.

      When ever a message is posted on the queue the MDB is notified and the message is consumed from the active server.

       

      This is similar to examples of jca-remote and jca-config examples available under the javaee folder of HornetQ distribution.

       

      Now if there are more than one set of active and stand-by servers in a cluster is there a way for the MDB to listen on the different active servers?

       

      How can the configuration be done for this?

       

      Please suggest...

        • 1. Re: High Availability Setup of HornetQ with JBoss in Cluster
          clebert.suconic

           

          Now if there are more than one set of active and stand-by servers in a cluster is there a way for the MDB to listen on the different active servers?

           

          You're talking about HA but you didn't mention anything about Backup nodes.

          It seems you're just looking to a way to talk to a MDB remotely?

           

          Can you be more specific in your question please? (Probably after taking another look on the HA chapter)

          • 2. Re: High Availability Setup of HornetQ with JBoss in Cluster
            balrajk

            Sorry, if my question was ambigious. I was referring to HA in a clustered environment.

             

            Let me try to rephrase my doubt.

             

            Say I have two instances of JBoss server along with HornetQ serving as active servers (say ActiveA & ActiveB). Each of these instances have a backup server (BackupA & BackupB respectively).

             

            Apart from these 4 instances I have a MDB running in another instance (say ListenerMDB). This listener should be capable to retrieve the message from either of the queues(Active / backup). It should be transparent to the MDB.

            • 3. Re: High Availability Setup of HornetQ with JBoss in Cluster
              clebert.suconic

              You should have a remote client on each node with a backup configured.

               

              Whenver the live node goes down, the remote client should reconnect to the backup.

               

               

              You just need to have the backups configured properly at your JCA.

               

              Notice that currently you can't have a MDB connection locally or the would be active right away.

              • 4. Re: High Availability Setup of HornetQ with JBoss in Cluster
                balrajk

                So if i understand that correctly then one remote client can connect to only one active/backup JMS server. There is no way single client can pick up from any of the active queues in which message is available (assuming both the active servers are up and running).

                 

                The reason I am trying to confirm this is because in our application we are planning to have 3 instances of HornetQ servers as Queues and 10 instances listening on these queues as we were in the assumption that the messages could be shared across these ten instances.

                • 5. Re: High Availability Setup of HornetQ with JBoss in Cluster
                  clebert.suconic

                  A single client connects to a single server.

                   

                  Man! you are confusing failover with clustering. These are different subjects.

                   

                  Each Connection is connect to a single server at any time, each connection will have its Backup node, the ConnectinFactory will balance connection between the active servers (if configured properly), and there's also server redistribution of the messages depending on the consumers you have.

                   

                   

                  this is all covered on the manual, so I suggest you read the manual

                  1 of 1 people found this helpful
                  • 6. Re: High Availability Setup of HornetQ with JBoss in Cluster
                    balrajk

                    Thanks for the clarification. I had gone through the documentation but also wanted to get it confirmed from a more knowledgeable person on this subject.