建站服务器
【队列状态】
1、直接网页查看:http://127.0.0.1:8161/admin/queues.jsp
2、curl(Queue Size with STOMP)
curl -u admin:admin http://127.0.0.1:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName=QueueName
3、Apache ActiveMQ > Connectivity > Protocols > REST
4、python + requests 查看
#encoding: utf-8 #author: walker #date: 2017-09-20 #summary: 查看 ActiveMQ 某个队列信息 import sys import json import requests from requests.auth import HTTPBasicAuth from pprint import pprint # 查看 ActiveMQ 某个队列信息 def DisplayQueueInfo(queueName): username = \'admin\' password = \'admin\' url = \'http://127.0.0.1:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Queue,destinationName=\' + queueName r = requests.get(url, auth=HTTPBasicAuth(username, password)) print(\'%s:\' % queueName) pprint(json.loads(r.text))
*** walker ***