博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ActiveMQ Tips
阅读量:7236 次
发布时间:2019-06-29

本文共 914 字,大约阅读时间需要 3 分钟。

【队列状态】

1、直接网页查看:

2、curl()

1
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、

4、python + requests 查看

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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
    
    
= 
requests.get(url, auth
=
HTTPBasicAuth(username, password))
    
print
(
'%s:' 
% 
queueName)
    
pprint(json.loads(r.text))

***  ***

本文转自walker snapshot博客51CTO博客,原文链接http://blog.51cto.com/walkerqt/1967219如需转载请自行联系原作者

RQSLT

你可能感兴趣的文章
hadoop之 distcp(分布式拷贝)
查看>>
Java后端程序员1年工作经验总结
查看>>
使用Vundle管理配置Vim的插件
查看>>
JDBC连接池&DBUtils使用
查看>>
可以通过shadowserver来查看开放的mdns(用以反射放大攻击)——中国的在 https://mdns.shadowserver.org/workstation/index.html...
查看>>
IOS系统控件高度
查看>>
Flink - ResultPartition
查看>>
2017.10.09 穆瑞课KUKA机器人培训视频的感想
查看>>
Jsoup
查看>>
python中的中文编码问题
查看>>
安卓播放音频
查看>>
in linux system of ftp command
查看>>
Win API:之GetCurrentThread、GetCurrentThreadId、GetCurrentProcess、GetCurrentProcessId
查看>>
***PHP $_FILES函数详解 + PHP文件上传 move_uploaded_file() 参数的正确写法
查看>>
Mysql中Group By使用Having语句配合查询(where和having区别)
查看>>
C#连接数据库
查看>>
重定向和管道的区别
查看>>
分层、链式分析、url、联系的长度
查看>>
C++实现ping功能<转>
查看>>
使用matplotlib绘制收入增长模型——线性积累型与指数复利型
查看>>