This is an example of how use the Java JMS api with ActiveMQ.
- Install Java SDK
- Install Maven
- Broker needs to be configured with the broker stats plugin:
For more information on the Broker Statistics plugin see the Broker Statistics Plugin Doc
Run:
mvn install
To get Broker stats run:
java -cp target/broker-stats-0.1-SNAPSHOT.jar example.BrokerStats
To get stats on a specific destination run:
java -cp target/broker-stats-0.1-SNAPSHOT.jar example.DestinationStats
You can control to which server the examples try to connect to by setting the following environment variables:
ACTIVEMQ_HOST
ACTIVEMQ_PORT
ACTIVEMQ_USER
ACTIVEMQ_PASSWORD