Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
28.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");
Queue managementQueue = HornetQJMSClient.createQueue("hornetq.management");
All the other steps are the same as 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
:
28.4.1. Configuring JMS Management Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Whether JMS or the core API is used for management, the configuration steps are the same (see Section 28.3.1, “Configuring Core Management”).