ActiveMQ_rest API 方式 reload 日志

来源:互联网 发布:java系统时间带毫秒 编辑:程序博客网 时间:2024/05/20 13:07

注: (1)Mbean的属性:

  读取:baseURL/read/Mbean的全称/属性名称

  写入:baseURL/write/Mbean的全称/属性名称

    (2)Mbean的方法调用:

        baseURL/exec/Mbean的全称/方法名/参数1,参数2,参数3 

1.查看所有 queue 的 GET 方式 URL:

   http://localhost:8161/api/jolokia/read/org.apache.activemq:brokerName=localhost,type=Broker/Queues

    http://localhost:8161/api/jolokia/list

2.查看消息:

http://localhost:8161/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=localhost

,destinationType=Queue,destinationName=a/browse()/

3.从队列里删除一条 type 为 1 的消息:

  http://localhost:8161/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=localhost

,destinationType=Queue,destinationName=a/removeMatchingMessages(java.lang.String)/JMSType='1'

4. reload 日志

http://localhost:8161/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=localhost/reloadLog4jProperties

 参考:Jolokia官方文档: http://www.jolokia.org/reference/html/protocol.html

             http://www.tuicool.com/articles/vmm2Ib


0 0