I'm trying to monitor activemq Dequeued messages overtime and save them in Zenoss monitoring system.
I can see the Dequeued number in the control panel of activemq, however if I restart activemq, those numbers are reset.
What's the best way of capturing statistics?
Thanks
Due to the way it's designed, there's no way to recover that information after a restart.
I think your best bet would be to use a 3rd party monitoring tool (Nagios, Cacti, etc) to dump AMQ stats into (some even have AMQ plugins). These tools are designed for long term monitoring/charting/alerting of system resources and are pretty easy to hook up to AMQ...
Related
If as admin I wanted to know from a particular queue A, how many calls initiated by which person and how many get dequeued, and how many are still in queue # any time.
I just want to develop one UI in my application to show those user-specific records from ActiveMQ.
There is no built in functionality in the broker that does this sort of thing. You could develop your own broker plugin that tracks these things but you'd need to build some sort of DB or other storage as you would lose any in-memory stats when a broker is restarted. You should use caution when trying to push all requirements into the message broker for system level management as that is not its purpose and will likely result in other issues when you do.
I am new at RabbitMQ am wonder something about saving message strategy. By default RabbitMQ saves message queuses on memeory. This way is high performance. But messages are important and should be save on disc. Because server may down at any time. This way shows slower performace.
Which stuation should be prefable. What is your real world experience?
There is a whole lot regarding persistance here.
You can make queues durable, in that way messages are saved to the disk. Of course only until they are acknowledged!
You didn't say what is your use case and what do you need this for, but bare in mind that RAbbitMQ is not a database.
https://www.rabbitmq.com/alarms.html
according to docs,
There are two circumstances under which RabbitMQ will stop reading from client network sockets, in order to prevent crashes. They are:
When memory use goes above the configured limit.
When disk space drops below the configured limit.
I want to send mail to admin if any of condition is breached.
Thanks in advance for helping.
there are a lot of off-the-shelf tools that will do this for you. check out the management & monitoring section of the "How To" page on the RMQ website and find one that works with your existing monitoring tools.
This is bugging me for a while, in rabbitMQ I keep getting:
The management statistics database currently has a queue of [some number] events to process. If this number keeps increasing, so will the memory used by the management plugin. You may find it useful to set the rates_mode config item to none.
My applications requires the management part to get the current queue names. so I can't just stop it.
but how can I do it without breaking the current queues in rabbitMQ?
rates_mode is about how the queues report statistics. So if you want to disable that, then just do it: https://www.rabbitmq.com/management.html
You will still be able to list/inspect queues on the management plugin
This is probably a very simple answer, but I'm not seeing an obvious solution in the MassTransit docs or forums.
When you have some messages that have been moved over to the error queue in RabbitMQ, what's the best mechanism for getting them back into the processing queue? Also, is there any built-in logging of why they got moved over there in the first place?
Enable logging with the right plugin (NLog, log4net, etc) and failures should be in the log, assuming the right log level is enabled.
There is no great way to move messages back. Dru has worked on a busdriver tool https://github.com/MassTransit/MassTransit/tree/master/src/Tools/BusDriver. This, I believe, will allow you move items from one queue to another - but it's not a tool I've used. I have historically written tools that are related to business processes to move items back to the proper queue for processing that ops will manage.