This topic has not yet been written. The content below is from the topic description.
30.4. Using Management Via JMS Using JMS messages to manage HornetQ is very similar to using core API. An important difference is that JMS requires a JMS queue to send the messages to (instead of an address for the core API). The management queue is a special queue and needs to be instantiated directly by the client: Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management"); All the other steps are the same than for the Core API but they use JMS API instead: create a QueueRequestor to send messages to the management address and receive replies create a Message use the helper class org.hornetq.api.jms.management.JMSManagementHelper to fill the message with the management properties send the message using the QueueRequestor use the helper class org.hornetq.api.jms.management.JMSManagementHelper to retrieve the operation result from the management reply For example, to know the number of messages in the JMS queue exampleQueue: Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management"); QueueSession session = ... QueueRequestor requestor = new QueueRequestor(session, managementQueue); connection.start(); Message message = session.createMessage(); JMSManagementHelper.putAttribute(message, "jms.queue.exampleQueue", "messageCount"); Message reply = requestor.request(message); int count = (Integer)JMSManagementHelper.getResult(reply); System.out.println("There are " + count + " messages in exampleQueue");