6 Replies Latest reply on Apr 19, 2010 10:36 AM by David Jefferson

    Automatically creating topics

    David Jefferson Newbie

      We are considering migrating from SonicMQ to HornetQ.

       

      We use a lot of topics. In Sonic there is no administration to topics. You simply post a message to the topic and it gets created automatically.

      I know that you can create topics in the hornetq-jms.xml file but is there any way that the topics can be automaticaly created like in Sonic?

       

      Dave

        • 1. Re: Automatically creating topics
          Roklee LLC Newbie

          David, you can basically use the same concept as in this post:

           

          http://www.roklee.com/?p=205

           

          If you have any questions don't hesitate to ask.

           

          Regards

          1 of 1 people found this helpful
          • 2. Re: Automatically creating topics
            Keith Irwin Newbie

            I had a lot of problems automatically creating topics when using the JMS interfaces provided by HornetQ. I had to create a separate management queue and send messages to it asking it to create the topic, then continue on and actually use it.

             

            Slick, in some ways, but cumbersome for my needs.

             

            Once I switched over to using the Core interfaces, things got considerably easier. Works just like it does on, say, ActiveMQ. You can add security features which disable that, but if you use the "non-secure" mode out of the box, you're good to go.

             

            Another reason for not using the JMS interfaces was that I couldn't figure out how to support the round-robin queues, which are really handy for certain scalability problems.

             

            The Core API is a lot like AMQP, and I wouldn't be surprised if under the covers, the HornetQ wire protocol is AMQP.

             

            Keith

            • 3. Re: Automatically creating topics
              Tim Fox Master

              Keith Irwin wrote:

               

              I had a lot of problems automatically creating topics when using the JMS interfaces provided by HornetQ. I had to create a separate management queue and send messages to it asking it to create the topic, then continue on and actually use it.

               

              Slick, in some ways, but cumbersome for my needs.

               

              Once I switched over to using the Core interfaces, things got considerably easier. Works just like it does on, say, ActiveMQ. You can add security features which disable that, but if you use the "non-secure" mode out of the box, you're good to go.

               

              Another reason for not using the JMS interfaces was that I couldn't figure out how to support the round-robin queues, which are really handy for certain scalability problems.

               

              The Core API is a lot like AMQP, and I wouldn't be surprised if under the covers, the HornetQ wire protocol is AMQP.

               

              Keith

              Our core protocol is not AMQP.

               

              If it we were AMQP we wouldn't be able to get the performance we do

              • 4. Re: Automatically creating topics
                Keith Irwin Newbie

                I guess I didn't think it was, but it "seems" like it, somehow, from a user point of view.

                 

                Keith

                • 5. Re: Automatically creating topics
                  Tim Fox Master

                  It's certainly simpler than JMS. When we set about designing it we deliberately wanted to remove as much of the cruft of JMS as possible - e.g. queues and topics aren't considered as separate first class entities as they are in JMS.

                   

                  We just think of addresses which have queues bound. Then a JMS queue and JMS Topic are just two specific cases of a more general construct.

                   

                  JMS Queue = address with one queue bound. JMS Topic = address with multiple queues bound (each topic subscription is a queue).

                   

                  In that sense, at least, the conceptual model is somewhat similar to AMQP, but the wire protocol is less verbose and more optimised than AMQP.

                  • 6. Re: Automatically creating topics
                    David Jefferson Newbie

                    Thanks for all the help.

                     

                    In the short term I have just configured all the topics and queues in the hornetq-jms.xml file.

                    If our eval goes well then I will probably switch to the core interface as all our jms code is pretty well encapsulated.

                     

                    Dave