5 Replies Latest reply on Jun 24, 2010 9:15 AM by mjustin

    JMS management over Stomp: no messages in Topic hornetq.management

    mjustin

      Hello,

       

      tody I tried the JMS management API with the Stomp transport. Retrieveing object information with hornetq.management (using _HQ_ResourceName and _HQ_Attribute) works fine. The result messages contain the information as binary data, I guess it is a serialized Java object, but this is ok at the moment. (Maybe it is possible to add a XML or JSON serializer for Java objects in the Stomp bridge later?)

       

      However I had no success with JMS message notifications (chapter 30.5.3 in the user guide). The Java example uses a special two-argument constructor for the topic:

       

      Topic notificationsTopic = HornetQJMSClient.createHornetQTopic("hornetq.notifications", "hornetq.notifications");

       

      Is this part of the documentation still valid? I checked the Java file for HornetQJMSClient in the 2.1.0.CR1 source and did not find this method.

      I have also added <management-notification-address>hornetq.notifications</management-notification-address> to the configuration.

       

      Maybe there are some special requirements for the JMS message notifications feature if used over Stomp? I will  test it with the Java JMS API later.

       

      Regards,

      Michael Justin

        • 1. Re: JMS management over Stomp: no messages in Topic hornetq.management
          jmesnil

          Michael Justin wrote:

           

          Hello,

           

          tody I tried the JMS management API with the Stomp transport. Retrieveing object information with hornetq.management (using _HQ_ResourceName and _HQ_Attribute) works fine. The result messages contain the information as binary data, I guess it is a serialized Java object, but this is ok at the moment. (Maybe it is possible to add a XML or JSON serializer for Java objects in the Stomp bridge later?)

          Actually, management messages sends their result as a JSON string. Unfortunately, this string is encoded by HornetQ making it opaque to Stomp clients.

          I'll change that in a future release so that the JSON string will directly be the body of the Stomp MESSAGE frame.

           

          However I had no success with JMS message notifications (chapter 30.5.3 in the user guide). The Java example uses a special two-argument constructor for the topic:

           

          Topic notificationsTopic = HornetQJMSClient.createHornetQTopic("hornetq.notifications", "hornetq.notifications");

          The documentation was out of date. I've updated with the correct code snippet. I've also change the JMS management-notification example to use a JMS Topic to receive notification. In doubt, you can refer to this example to see how to configure HornetQ server.

           

          thanks for the feedback

          • 2. Re: JMS management over Stomp: no messages in Topic hornetq.management
            jmesnil

            Jeff Mesnil wrote:

             

            Michael Justin wrote:

             

            Hello,

             

            tody I tried the JMS management API with the Stomp transport. Retrieveing object information with hornetq.management (using _HQ_ResourceName and _HQ_Attribute) works fine. The result messages contain the information as binary data, I guess it is a serialized Java object, but this is ok at the moment. (Maybe it is possible to add a XML or JSON serializer for Java objects in the Stomp bridge later?)

            Actually, management messages sends their result as a JSON string. Unfortunately, this string is encoded by HornetQ making it opaque to Stomp clients.

            I'll change that in a future release so that the JSON string will directly be the body of the Stomp MESSAGE frame.

            https://jira.jboss.org/jira/browse/HORNETQ-343

            • 3. Re: JMS management over Stomp: no messages in Topic hornetq.management
              mjustin

              Hi Jeff,

               

              the management notification works great over Stomp, many thanks for your assistance! Today I blogged about it at http://mikejustin.wordpress.com/ and also posted a tutorial for JBoss AS 5 integration with Delphi and Free Pascal over HornetQ and my client library there.

               

              Regards,

              Michael Justin

              • 4. Re: JMS management over Stomp: no messages in Topic hornetq.management
                jmesnil

                Hi michael,

                 

                I fixed the issue in HornetQ trunk and it is now possible to read management operation results from Stomp https://jira.jboss.org/browse/HORNETQ-343
                Have a look at ManagementWithStompTest to see how it looks like.

                 

                regards,

                jeff

                • 5. Re: JMS management over Stomp: no messages in Topic hornetq.management
                  mjustin

                  Hi Jeff,

                   

                  wonderful, I will include it in the next update of my Stomp library for Delphi and Free Pascal!

                   

                  Mike