ActiveMQ在不使用JMX,JMS的情况下获取队列大小 [英] ActiveMQ get queue size without using JMX, JMS

查看:123
本文介绍了ActiveMQ在不使用JMX,JMS的情况下获取队列大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种不用使用JMX 使用JMS迭代所有队列。是否有使用ActiveMQ API获取队列大小的解决方案?

I need a way for getting queue size in ActiveMQ without using JMX or Iterate all queue using JMS. Is there any solution for getting queue size using ActiveMQ API.

推荐答案

JMS中没有用于查询代理以获取统计信息的API,这与将客户端彼此分离的概念背道而驰和中间经纪人。 ActiveMQ确实提供了一些您可以使用的功能,JMX是获得所追求的功能的最强大方法,但是如果您不想直接使用JMX API,则可以使用基于REST的方法,该方法使用< ActiveMQ嵌入的href = https://jolokia.org/ rel = noreferrer> Jolokia 项目可支持对 JMX Mbeans noreferrer> REST调用。

There is no API in JMS for querying the broker for stats, that goes against the concept of decoupling the client from each other and the intermediate broker. ActiveMQ does offer a few things that you can use, JMX being the most powerful way to get what you are after but if you don't want to go directly to the JMX API you can use the REST based approach that makes use of the Jolokia project which ActiveMQ embeds to support access to the JMX Mbeans that the broker exposes using REST calls.

除了REST选项外,唯一的其他方法是启用 Statistics Broker插件,可让您向目标代理发送目标消息,以使用标准JMS代码检索运行时统计信息。

Besides the REST option the only other way is to enable the Statistics Broker Plugin to allow you to send targeted messages to the broker to retrieve run time stats using standard JMS code.

这篇关于ActiveMQ在不使用JMX,JMS的情况下获取队列大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆