简体   繁体   English

ActiveMQ警报旧消息

[英]ActiveMQ alerting old messages

I am using ActiveMQ and want to generate alerts for messages which are sitting int the queue for very long time. 我正在使用ActiveMQ,并且想为坐在队列中很长时间的消息生成警报。 I looked at "Advisory Message" feature but it has no such provision. 我查看了“咨询消息”功能,但没有这样的规定。 It is very important for me to use a solution which does not add too much overhead on AMQ. 对我来说,使用不会在AMQ上增加过多开销的解决方案非常重要。

Note:This requirement is very different from alerts when message moves to DLQ after expiry. 注意:此要求与消息在过期后移至DLQ时的警报有很大不同。

The only means of reviewing what is in a Queue really is to browse it and the broker will place limitations on how far into the contents of the queue you can browse. 真正检查队列中的内容的唯一方法是浏览队列,代理将限制您可以浏览的队列内容的距离。

A message broker is not a database and you should not try to treat as such. 消息代理不是数据库,您不应尝试将其视为此类。 If you have concerns about things remaining on a queue for to long then explicit expiration is your most effective tool. 如果您担心事情在队列中保留很长时间,那么显式过期是您最有效的工具。

You can build you own tooling to track the advisories around message enqueue and dequeue but you'd just end up needing to persist that information to make it effective so going back and reevaluating why you need to do this and what might be a better choice of architecture might be appropriate. 您可以构建自己的工具来跟踪有关消息入队和出队的咨询,但最终只需要保留该信息以使其有效,因此请回头重新评估为什么需要这样做以及什么是更好的选择体系结构可能是合适的。

If you insist on want to audit the contents of the Queues then you'd want to look at configuration for max browse page size to try and let you get further into the Queue on a browse but depending on depth this probably won't get you everything you want. 如果您坚持要审核队列的内容,则需要查看最大浏览页面大小的配置,以尝试让您进一步进入浏览队列,但是根据深度,这可能无法解决您的问题所有你想要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM