I would like to display JMS queue statistics on the page where I may present how many messages are in the queues
Is there any way to do that in universal way (without using any provider specific API) whithout iterating through all messages?
I know that I may achive that using QueueBrowser.getEnumeration() however it is too costly to iterate over all messages just for simple counting functionality.
I see no reference to statistics in the JMS 1.1 spec.
My experience w/ statistics is that they're available through vendor-specific interfaces.
I do not believe that it is possible in the manner you seek.
Although your question specifically asks about non-provider specific methods I will offer this:
ActiveMQ can be monitored via JMX which allows you to interrogate many things including queue size. You can always create an interface which you can then extend on a per-provider basis (and as an example you would retrieve queue size from an ActiveMQ provider implementation via JMX).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With