1 Reply Latest reply on Mar 6, 2014 12:23 PM by Justin Bertram

    Remotely Managing HornetQ

    jdiscar jdiscar Newbie

      I've been wondering if there was a recommended way for programmatically managing HornetQ from a client.  I read the Management chapter in the documentation.

       

      I've been doing Management via JMS using JMSManagementHelper.  I use it frequently to monitor our message counts and rarely to dynamically create topics.  However, I've found the interface confusing and messy to use.  I was wondering if there was a design reason that adapters aren't provided so that putAttribute/putOperationInvocation could be avoided.

       

      I found the ResourceNames class, but it wasn't very clear what @operationName were valid for each resource.  I'm assuming they match up as follows:

       

      JMS_CONNECTION_FACTORY / ConnectionFactoryControl

      JMS_QUEUE / JMSQueueControl

      JMS_SERVER / JMSServerControl

      JMS_TOPIC / TopicControl

       

      Is that right?  Are all methods in the corresponding classes remotely accessible?

       

      Is there a way to get all the valid operationNames and parameters?

       

      I know there's a lot of questions here.  Thanks for the clarifications.

        • 1. Re: Remotely Managing HornetQ
          Justin Bertram Master

          I've been doing Management via JMS using JMSManagementHelper.  I use it frequently to monitor our message counts and rarely to dynamically create topics.  However, I've found the interface confusing and messy to use.

          That's not terribly surprising since management via JMS (or Core) is essentially de-typed.

           

          I was wondering if there was a design reason that adapters aren't provided so that putAttribute/putOperationInvocation could be avoided.

          Have you looked at org.hornetq.tests.integration.jms.server.management.JMSMessagingProxy?  You can see, for example, how this is used in org.hornetq.tests.integration.jms.server.management.JMSQueueControlUsingJMSTest.

           

          I found the ResourceNames class, but it wasn't very clear what @operationName were valid for each resource.  I'm assuming they match up as follows:

           

          JMS_CONNECTION_FACTORY / ConnectionFactoryControl

          JMS_QUEUE / JMSQueueControl

          JMS_SERVER / JMSServerControl

          JMS_TOPIC / TopicControl

           

          Is that right?

          Yes, that's right.

           

          Are all methods in the corresponding classes remotely accessible?

          Yes.  The server invokes the methods by reflection so as long as you use the proper name and parameters then the method will be invoked.

           

           

          We have a task to document this ([HORNETQ-1088] Document management operations more clearly) but other priorities have superseded it.  Please feel free to contribute if you can.