ActiveMQ JMS ping

发布于 2024-08-23 08:27:16 字数 612 浏览 4 评论 0原文

Apache Activemq 5.2.0

我的应用程序侦听三个主题的消息并发送有关 2 个主题的消息。当我的应用程序“webping”时,我想检查这些主题是否存在。我想知道这是否可能。这是我的观察,

  1. 建议消息可以用于此目的,但它们仅在以下情况下发送消息生产者/消费者加入。这不完全是我想要的。我只想检查我是否可以向出站主题发送消息以及可以接收关于入站主题的消息。
  2. 定制心跳解决方案。我可以让每个生产者每 5 秒发送一条心跳消息,并且监听器不处理心跳消息,而是更新标志/时间戳。这样我就知道该主题已经启动并正在运行。
  3. Apache ActiveMQ 中是否内置了类似心跳的东西?或“某个主题的 ping”?

我知道 JMS 不是用于监控,但如果我是某个主题的制作人,那么最好知道我是否可以以合理的舒适度来制作该主题。我也同意 ping 和消息之间的通道可以关闭,这对我来说是可以接受的失败。

我只想要一个健康检查系统/页面,它可以说“是的,主题在那里并且 activemq 正在运行”

Apache Activemq 5.2.0

My application listens to messages on three topics and sends messages on 2 topics. When my application is "webping"ed, I want to check if these topics are alive. I would like to know if this is possible. Here are my observations,

  1. Advisory messages can be used for this, but they send messages only when a producer/consumer joins. This is not quite what I want. I just want to check if I can send messages to outbound topics and can receive messages on the inbound topic.
  2. Custom Heartbeat solution. I can make every producer send a heartbeat message say every 5 seconds and the listener to not process heartbeat messages but update a flag/timestamp. That way I know the topic is up and running.
  3. Is there a heartbeat kinda thingi inbuilt in the Apache ActiveMQ? or a "ping for a topic" ?

I understand JMS is not for monitoring but if I am a producer for a topic, it will be good to know if I can produce on the topic with reasonable comfort level. I also agree between a ping and a message the channel can go down and that is an acceptable failure for me.

I just want a health check system/page which can say "yes topics are there and the activemq is running"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

机场等船 2024-08-30 08:27:16

您可以使用 JMX 监控 ActiveMQ。这将允许您查看服务器是否已启动、哪些主题/队列处于活动状态以及许多其他有用的信息。

You can monitor ActiveMQ using JMX. This will allow you to see if the server is up, what topics/queues are active and a lot of other useful information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文