Faster Queue Counts

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Faster Queue Counts

Bali
How can we get the queue counts faster from SwiftMQ CLI. Currently we are using SwiftMQ 9.2.0 and through CLI queue count takes about 2 mins for 500 queues.
What is the preferred way to get queue message counts faster preferably on the order of seconds.

Thanks
Bali
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
Are you using CLI from a command line or the CLI Admin API?
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

Bali
CLI Admin Api from my Java program
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
There is no way to improve these calls as they are all synchronously and go through the Management Swiftlet. You could write a custom Swiftlet that travels through the counts and sends you the results in one go to a queue. There is an example called Event Swiftlet as part of the Swiftlet API.

You could also use the SNMP Swiftlet and integrate it with Nagios for monitoring.
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

Bali
How do I write swiftlets myself, any documentation on these or any example code
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
The Swiftle API is part of your router docs (in the "docs" folder).
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
In reply to this post by Bali
What do you want to achieve by continuously querying the message counts of hundreds of queues? May be I can suggest a better solution than that...
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

sanjan
Hi, I have the same requirement as well.
Queue depth monitoring is critical to our platform.
We are actually processing time sensitive messages.
so we have to keep an eye one the queue depth constantly.
currently we have written a software that query queue depth through CLI Admin API.
we connect all our routers to a "master router" via routing swiftlet
and connect our monitoring application to the "master router" and do the querying. ever minute.

however I do feel that its not fast enough, specially when there is high message traffic.

another draw back is that messages may be routed via the master router. we dont want that to happen.

Please do tell what is the better way of doing this?


Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
This is too time expensive. Each CLI call is synchronous request/reply with the Management Swiftlet of the router where you need the value from. Just imagine what kind of overhead you generate here. SwiftMQ Explorer works different. It gets asynchronous updates from the routers where it is connected too.

Another solution is to use the SNMP Management Swiftlet and Nagios as the monitoring tool.  
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

mpoornima
I see that getting queue counts can also be done via JMX. http://www.swiftmq.com/products/router/admin/jmx/. Is this any faster? We too have the same problem of the time taken using CLI to get the queue counts and we use this information for monitoring of message counts in our queues.
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
You can try it but I doubt that JMX is faster as it creates a MBean for every entity of the management tree and you have to iterate through these MBeans via remote JMX access. The best solution is SNMP.
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

mpoornima
Here are the details:

1171239ms (19 minutes) to get all queue counts through CLI and 61411ms (~ a minute) through JMX.
#of Queues: 1867
Reply | Threaded
Open this post in threaded view
|

Re: Faster Queue Counts

IIT Software
Administrator
Although JMX uses CLI internally. ;) The difference is the request/reply through the Management Swiftlet.