[rabbitmq-discuss] Lightweight query for queues?
ian.ragsdale at gmail.com
Tue May 3 19:18:04 BST 2011
So the updated management plugin seems to have gotten rid of the crashes I was seeing, which is great - thanks to the rabbitmq devs for a quick response!
One useful thing about that thread was figuring out just how resource-intensive the management plugin is when querying the API for queues. On my server with around 6000 queues, I can run 'rabbitmqctl list_queues' and get results in a second, but if I query the API for the list of queues it pegs one of the CPUs for upwards of 30 seconds, returning over 8MB of data.
I know all of this data is useful for the web interface you have built, but for my purposes I really just need to pull the data returned by 'rabbitmqctl list_queues name messages messages_unacknowledged', which seems like it should be really quick to gather and return, based on the performance of that command. In addition, I generally don't need this information for every queue, but for a subset of queues, which can generally be described with a simple regex on the name.
So, what I'd like to be able to do is:
1. Allow specifying which data needs to be returned, so that more expensive statistics can be avoided if necessary.
2. Allow filtering the list of queues to return data for with a search term
I can't find anything in the docs that suggests this is currently possible, and although I don't really know Erlang, I spent some time looking through the management plugin source and it doesn't look like that functionality exists.
Besides making it more usable for 3rd party integration, it would allow you to improve the management web interface. You currently only show a subset of the data on the queues tab, and you only show the top 500, so people with more than 500 queues often can't find the one they want. With those additions you can make the interface more responsive by only requesting data that is actually shown, and adding a search box to let people show just the queues they are looking for.
Is this something you guys would consider? If you guys aren't interested in doing the work but would be interested in a patch, I could give it a shot - I don't really know Erlang yet but this seems like a somewhat simple project to take on.
More information about the rabbitmq-discuss