11 Replies Latest reply on Feb 24, 2013 7:23 AM by raymanf

    Distributed Queue/Topic

    raymanf Newbie

      Hi,

       

      I am using HornetQ 2.1.1 integrated inside Spring3.1.

       

       

      We are intrested to configure faileover mechanizem.

       

      I know that the backup queue supposed to be in a diffrent server .

       

      My question is:

       

      What about having a backup queue in the same jvm in case of queue conjunction case.

       

      Is that kind of sceanario even could happen? when queue crushing after being loaded with messages while still having the JVM up?.

       

      If that sceneario does happen a second queue ont the same jvm would solve it?

       

      thanks,

      ray.


        • 1. Re: Distributed Queue/Topic
          Andy Taylor Master

          No we dont do that, if that is a problem then you need to configure flow control to limit messages arriving on a queue or cluster your queue so messages are distributed

          • 2. Re: Distributed Queue/Topic
            raymanf Newbie

            ill re-direct my question:

             

            Doest it matter from treshold/memory/loading aspects:

             

            if you have one queue in a JVM which will handle for example X messages per min

             

            or having 3 queues which will handle X/3 messages per min(for each queue)?

             

            (same jvm)

             

            thanks.

            • 3. Re: Distributed Queue/Topic
              Andy Taylor Master

              thats a bit of a broad question,  if you have 3 queues then you will be using more memory and will use more processing time, how this effects memory and performace depends more on your network bandwidth, disc speed, how many processors you have etc etc.

              • 4. Re: Distributed Queue/Topic
                raymanf Newbie

                "on your network bandwidth, disc speed, how many processors.."

                 

                i am talking about exactly the same conditions. same enviroument(networkd, bandwith, disc ..)


                 

                just having 3 queues to handle the messages with 3 mdbs vs

                 

                one topic and variouse MDB's while each one filters to have it relevant messages.

                 

                 

                thanks.


                • 5. Re: Distributed Queue/Topic
                  Andy Taylor Master

                  i am talking about exactly the same conditions. same enviroument(networkd, bandwith, disc ..)


                   

                  just having 3 queues to handle the messages with 3 mdbs vs

                   

                  one topic and variouse MDB's while each one filters to have it relevant messages.

                  Ok, now you are asking a what looks like a totally different question, but im not sure i get what you are asking, the difference between using message selectors on queues vs topics maybe?

                  • 6. Re: Distributed Queue/Topic
                    raymanf Newbie

                    the difference between using message selectors on queues vs topics maybe?

                    Yes and no..

                     

                    In one hand I can have 3 diffrent queues while each queue will have it's own MDB without a need for any filtering. the message you get is the right message for you approach.

                     

                    in second hand I can have one topic with message selectors while each MDB will get it's message. the topic will retrieve all messages.

                     

                    so that makes it again one topic which handle X messages VS 3 queues which handles X/3 messages.

                     

                    talking about memory, processing time and trashold aspects.

                     

                    thanks.


                    • 7. Re: Distributed Queue/Topic
                      Justin Bertram Master

                      Three individual queues will probably perform slightly better since you don't need to match any kind of selector.  The messages are pre-sorted so to speak.

                      • 8. Re: Distributed Queue/Topic
                        raymanf Newbie

                        Hi Justin,

                         

                        But as Andy mentiond : .

                        .if you have 3 queues then you will be using more memory and will use more processing time..

                         

                        and additionaly I will heart the dynamic of my application because in case I will have new producer ill need to create infront of it new queue(and new MDB) in the core system. meaning taking the system down and create new queue and mdb for it. 

                         

                        So I guess this is the tradeoff eh?

                         

                        What do you think?

                         

                        thanks,

                        ray.

                        • 9. Re: Distributed Queue/Topic
                          Justin Bertram Master

                          Reading through the thread, I believe Andy was comparing the use of 1 queue vs. 3 queues.  But now we're talking about 1 queue vs. 1 topic with selector-based consumers.  The comparison is obviously different.  In any event, I stand by my previous comment.

                           

                          Regarding your application design, that's not something you originally mentioned as a factor.  Previously you were asking about "memory, processing time and trashold aspects."  If you want to factor in how easy one approach is to maintain vs. the other then the topic-based approach is the clear winner.

                           

                          If you are really curious about "memory, processing time and trashold aspects" then I suggest you set up an environment where you can test the two head to head.  Each approach is essentially the same under the covers inside HornetQ.  The only significant difference I see is having to execute matching logic for the selector (which I've already mentioned).

                          • 10. Re: Distributed Queue/Topic
                            Andy Taylor Master

                            Reading through the thread, I believe Andy was comparing the use of 1 queue vs. 3 queues.

                            Yes I was answering the original question which was what is the difference between 1 queue and 3 queues.