ActiveMQ JMS ping
Apache Activemq 5.2.0
我的应用程序侦听三个主题的消息并发送有关 2 个主题的消息。当我的应用程序“webping”时,我想检查这些主题是否存在。我想知道这是否可能。这是我的观察,
- 建议消息可以用于此目的,但它们仅在以下情况下发送消息生产者/消费者加入。这不完全是我想要的。我只想检查我是否可以向出站主题发送消息以及可以接收关于入站主题的消息。
- 定制心跳解决方案。我可以让每个生产者每 5 秒发送一条心跳消息,并且监听器不处理心跳消息,而是更新标志/时间戳。这样我就知道该主题已经启动并正在运行。
- 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,
- 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.
- 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.
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 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.