6 Replies Latest reply on Oct 16, 2009 12:57 AM by pieter.martin

    Re: HQ JBoss and clustering

    pieter.martin

      Hi,

      When have a need for clustered messaging. We are running JBoss 5 at the moment.

      Do we have to cluster separate JBoss instances to get a HQ cluster set up or is it possible to configure many HQ nodes inside one JBoss instance?

      Thanks
      Pieter

        • 1. Re: HQ JBoss and clustering
          clebert.suconic

           

          Do we have to cluster separate JBoss instances to get a HQ cluster set up or is it possible to configure many HQ nodes inside one JBoss instance?


          It's technically possible to have multiple HornetQ instances inside JBoss.

          We do that all the time on the testsuite. But, you would need to mess up with the resource adapters properties.. etc.

          But TBH, I don't see any use for that though. Why would you like to do that?

          If they are in the same phisical node? Why would you want to use clustering?

          beyong that, if they are in the same VM, why would you want to use clustering?


          So, you would bring a lot of complications in terms of config without bringing you any advantages. (At least I don't see any)

          • 2. Re: HQ JBoss and clustering
            pieter.martin

            Hi,

            Yeah, mostly I asked due to a lack of understanding. There are also no clustered JEE examples in the distro. The many other examples are however much appreciated.

            The topology I had in mind in the beginning was a cluster of messaging servers (to keep the boss happy about HA of JMS) all sending messages to a single MDB client inside jboss. The MDB in turn fires a jBPM process where the real work happens.

            I had no real requirement to cluster the consumer application as the idea is that even if the app goes down the messages will be persisted in the durable queues.

            For now I have settled on clustering the message consumer application although that adds a whole world of complications.

            Perhaps you can advise a better solution.

            Thanks
            Pieter

            • 3. Re: HQ JBoss and clustering
              clebert.suconic

               

              For now I have settled on clustering the message consumer application although that adds a whole world of complications.

              Perhaps you can advise a better solution.


              I don't have much information about what you're looking for.

              But do you realize that Clustering and Failover are different things on HornetQ?


              We have the concept of Backup nodes for Failover.


              And the concept of clustering for sharing the load with multiple nodes.


              Those are all separated now on HornetQ. If you are just looking for HA, you only need Failover.

              This is all on the docs. Let me know if you have any specific questions and I will try to help you better.

              • 4. Re: HQ JBoss and clustering
                pieter.martin

                Hi,

                I have read the docs, a couple of times in fact. The part I am battling to understand is how HA and clustering will work in a JBossAs environment.

                For now what is more important for us is that there is always a queue available for a client (producer) to connect to. For this clustering seems more appropriate.

                However this forces me to cluster the whole JBossAs including my consumer application that is deployed in JBoss.

                So my specific question is that if I do not want to run my consumer application in a clustered environment but need a clustered hornetq, is this possible?

                Keeping in mind that the consumer app is deployed in JBoss with a MDB waiting for messages.

                Mind you, now that I am writing this I am thinking that perhaps the following topology is a solution.

                Client producers send messages to a standalone HornetQ cluster which in turn have a core bridge to a JBoss instance with the consumer app deployed in it. This way I will have the robustness of a HornetQ cluster without needing to cluster the consumer JBoss application.

                Does this sound reasonable?

                Thanks for the help and advise?

                Pieter

                Thanks
                Pieter

                • 5. Re: HQ JBoss and clustering
                  clebert.suconic

                   

                  However this forces me to cluster the whole JBossAs including my consumer application that is deployed in JBoss.

                  So my specific question is that if I do not want to run my consumer application in a clustered environment but need a clustered hornetq, is this possible?



                  Sure.. that's perfectly possible.


                  You could start with default-with-hornetq configuration and change the configuration manually. (Or copy what you need from all-hornetq).

                  In fact.. even simpler.. Based in what you said here:

                  For now what is more important for us is that there is always a queue available for a client (producer) to connect to.


                  you don't even need JBoss for clustering. You could just run HornetQ standalone if that's all you need. Even simpler, right? Why would need an application server if all you need is HornetQ?

                  • 6. Re: HQ JBoss and clustering
                    pieter.martin

                    Thanks
                    Pieter