Apache activeMQ provide some startup daemon, if you extract the package and go into bin/ folder you will see
bin/
activemq
activemq-admin
linux-x86-32
linux-x86-64
|
--activemq libwrapper.so wrapper wrapper.conf
macosx
run.jar
wrapper.jar
try using jconsole
bin/
activemq
activemq-admin
linux-x86-32
linux-x86-64
|
--activemq libwrapper.so wrapper wrapper.conf
macosx
run.jar
wrapper.jar
Configure config file
Edit activemq config files at
apache-activemq-5.4.2/conf/activemq.xml
change this following lines from false into true
<managementContext> <managementContext createConnector="false"/> </managementContext>
into
<managementContext> <managementContext createConnector="true"/> </managementContext>
if you wanna using wrapper, unmark the jmx option at
apache-activemq-5.4.2/bin/linux-x86-64/wrapper.conf
become
wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
Run ActiveMQ
start the activeMQ, we are using the 64bit architecture
cd apache-activemq-5.4.2/bin/linux-x86-64/ ./activemq start
test the jmx connection using activemq query
./../activemq query
Test JMX
if success it will appears
INFO: Using default configuration (you can configure options in one of these file: /etc/default/activemq /home/fazries/.activemqrc) INFO: Invoke the following command to create a configuration file ./activemq setup [ /etc/default/activemq | /home/fazries/.activemqrc ] INFO: Using java '/usr/java/latest//bin/java' Java Runtime: Sun Microsystems Inc. 1.6.0_20 /usr/java/jdk1.6.0_20/jre Heap sizes: current=42496k free=42042k max=629888k JVM args: -Dactivemq.classpath=/home/fazries/activemq/conf; -Dactivemq.home=/home/fazries/activemq - Dactivemq.base=/home/fazries/activemq ACTIVEMQ_HOME: /home/fazries/activemq ACTIVEMQ_BASE: /home/fazries/activemq Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
TemporaryQueues = [] TemporaryTopics = [] DurableTopicSubscribers = [] QueueSubscribers = [] BrokerVersion = 5.4.2 TempLimit = 107374182400 Persistent = true InactiveDurableTopicSubscribers = [] TempPercentUsage = 0 MemoryLimit = 67108864 SslURL = StorePercentUsage = 0 Type = Broker TemporaryTopicSubscribers = [] BrokerId = ID:A1008.asyx.com-33582-1294640921569-0:1 TotalMessageCount = 0 TotalEnqueueCount = 3 StompSslURL = Queues = [org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=example.A, org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=TEST.FOO, org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=example.B] Topics = [org.apache.activemq:BrokerName=localhost,Type=Topic,Destination=ActiveMQ.Advisory.Queue] OpenWireURL = tcp://A1008.asyx.com:61616 DataDirectory = /home/fazries/activemq/data StoreLimit = 107374182400 TopicSubscribers = [] BrokerName = localhost TotalDequeueCount = 0 VMURL = vm://localhost StompURL = TemporaryQueueSubscribers = [] StatisticsEnabled = true MemoryPercentUsage = 0 TotalConsumerCount = 0 Slave = false
try using jconsole
jconsole service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
Thanks you article helped.
ReplyDelete