2
votes

I need to run a test on a remote host that has activeMQ running on it and I want to verify if the name of the queue is the right name by comparing it with a local file. I used bstat to get the status of activeMQ and then greped the part that has destionName but I was wondering if there is a better way to do it through command line or shell not java?

thanks in advance!

3

3 Answers

6
votes

You could use the command line tool "a".

a -b tcp://remote-broker-hostname:61616 --list-queues

would print

Queues:
Queue4
DELAYED
ChatMessages
Operation completed in 22ms (excluding connect)

It's written in java.

Disclaimer: I'm the author of that tool.

4
votes

Try activemq query command work with -QQueue and -view arguments.

#apache-activemq-5.10/bin/activemq query  -QQueue=* --view Name | grep Name

Name = test.queue
Name = notification-q

And you can pass the argument "--jmxurl" with proper value to communicate to remote ActiveMQ Server.

0
votes

I use this tool jmxterm to get ActiveMQ queue statistics & verify queue consumers from a bash script.

The following commands connects to AMQ ruuning on localhost to get few statistics of a Queue 'MyQueue'

open service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root -u user -p password
get -s -d org.apache.activemq -b BrokerName=default,Destination=MyQueue,Type=Queue QueueSize EnqueueCount DequeueCount ConsumerCount