Executing HornetQ Scripts
You execute HornetQ scripts to fetch details
about all queues from the JBoss CLI or view the list of messages on
a specific queue. HornetQ scripts are stored at the following location: /var/log/space-debug/debug-utilities/HornetQ
. When
you execute these scripts, the output is stored as .txt
files at the same location. You can also specify a custom path to
store the output. The following sections list the steps to execute
the scripts to fetch details about queues from the JBoss CLI.
Executing the HornetQ Script to View all JBoss Queues
You execute the HornetQInfoProvider.sh script to view all the JBoss queues.
To execute the script to view all JBoss queues:
- Log in to the CLI of the Junos Space node.
- Enter the administrator username and password at
the Junos Space login prompt and press Enter.
The default username is admin and the default password is abc123.
The Junos Space Settings Menu is displayed.
- Enter 6 (if you are
using a hardware appliance) or 7 (if you
are using a virtual appliance) at the Junos Space Settings Menu prompt
to run shell commands.
You are prompted to enter your password.
The following is a sample output from a virtual appliance:
admin@10.206.41.183's password: Last login: Mon Aug 17 06:17:58 2015 from 10.206.41.42 Welcome to the Junos Space network settings utility. Initializing, please wait Junos Space Settings Menu 1> Change Password 2> Change Network Settings 3> Change Time Options 4> Retrieve Logs 5> Security 6> Expand VM Drive Size 7> (Debug) run shell A> Apply changes Q> Quit R> Redraw Menu Choice [1-7,AQR]: 7
- Type the administrator password and press Enter.
The shell prompt appears.
- Type cd /var/log/space-debug/debug-utilities/hornetQ at the shell prompt and press Enter.
- (Optional) To view the list of HornetQ scripts, type ls and press Enter.
- Type ./HornetQInfoProvider.sh and press Enter.
The output from this command is saved to the
HornetQInfo.txt
file in the same directory. The following sample output displays one of the JBoss queues:------------------------------------------------------------ Time of execution: Tue Jul 21 05:58:23 UTC 2015 ------------------------------------------------------------ ==============================10.206.41.57=============================== { "outcome" => "success", "result" => [ { "address" => [ ("subsystem" => "messaging"), ("hornetq-server" => "default"), ("jms-queue" => "timeOutQueue") ], "outcome" => "success", "result" => { "consumer-count" => 15, "dead-letter-address" => "jms.queue.DLQ", "delivering-count" => 0, "durable" => true, "entries" => ["queue/timeOutQueue"], "expiry-address" => undefined, "message-count" => 0L, "messages-added" => 0L, "paused" => false, "queue-address" => "jms.queue.timeOutQueue", "scheduled-count" => 0L, "selector" => undefined, "temporary" => false } },
- (Optional) To save the list of all JBoss queues at a custom output location, type ./getDeviceInfo.sh<output-file-path> and press Enter.
You can view all the JBoss queues.
Executing the HornetQ Script to List of Messages in a JBoss Queue
You execute the HornetQInfoProvider.sh script to view the list of messages in a JBoss queue.
To execute the script to view the list of messages in a JBoss queue:
- Log in to the CLI of the Junos Space node.
- Enter the administrator username and password at
the Junos Space login prompt and press Enter.
The default username is admin and the default password is abc123.
The Junos Space Settings Menu is displayed.
- Enter 6 (if you are
using a hardware appliance) or 7 (if you
are using a virtual appliance) at the Junos Space Settings Menu prompt
to run shell commands.
You are prompted to enter your password.
The following is a sample output from a virtual appliance:
admin@10.206.41.183's password: Last login: Mon Aug 17 06:17:58 2015 from 10.206.41.42 Welcome to the Junos Space network settings utility. Initializing, please wait Junos Space Settings Menu 1> Change Password 2> Change Network Settings 3> Change Time Options 4> Retrieve Logs 5> Security 6> Expand VM Drive Size 7> (Debug) run shell A> Apply changes Q> Quit R> Redraw Menu Choice [1-7,AQR]: 7
- Type the administrator password and press Enter.
The shell prompt appears.
- Type cd /var/log/space-debug/debug-utilities/hornetQ at the shell prompt and press Enter.
- (Optional) To view the list of HornetQ scripts, type ls and press Enter.
- Type ./HornetQMessageViewer.sh<queue-name>—for
example, ./HornetQMessageViewer.shResyncJobDispatcherQueue.
The output from this command is saved to the
<queue-name>-messages.txt
file in the same directory. The following sample output displays the list of messages in a JBoss queue named ResyncJobDispatcherQueue.------------------------------------------------------------ Time of execution: Tue Jun 2 16:13:51 PDT 2015 ------------------------------------------------------------ [{"consumerName":"ServerConsumer [id=0, filter=null, binding=LocalQueueBinding [address=jms.queue.ResyncJobDispatcherQueue, queue=QueueImpl[name=jms.queue.ResyncJobDispatcherQueue, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=d2f96781-0972-11e5-9e84-69e3a4c4a918]]@3ead3529]]", "elements":[{"timestamp":1433286830611, "userID":"ID:0780c666-097d-11e5-9e84-69e3a4c4a918", "messageID":37172, "JobOperationName":"executeResyncDevices", "expiration":0, "address":"jms.queue.ResyncJobDispatcherQueue", "priority":4, "JobId":196669, "__HQ_CID":"077f8de2-097d-11e5-9e84-69e3a4c4a918", "durable":false,"type":2}]}]
- (Optional) To save the list of all messages at a custom output location, type ./HornetQMessageViewer.sh<queue-name> <output-file-path> and press Enter.
You can view the list of messages in a specific JBoss queue.