I know that we are using SonicMQ 7.6 (we aren't using the Event Monitor: we don't a license for it) and I also know that we haven't had the opportunity to upgrade to 8.0 (even if we have the license and I heard it has the Event Monitor).
Is there a way I can use to find out if a queue is ever used? We have a large number of (distributed) teams and I was asked to "prune" the unused queues (asking each team will take a long time due to their busy schedules).
You could try using the application.alert.queue.messages.Count notification, see the NotificationReporter.java sample in \MQx.x\samples\Management\runtimeAPI\javaProxy.
Thanks, The problem with this approach is that it will always return 0 if the messages are flowing to the consumer. Is there any other notification(s) I can use?
I did find this snippet (below) which kind of made me have more questions than answers.
filter = new ExpressionBasedNotificationFilter();
BTW, just to prove my point, I wrote a toy program to continuously produce and consume messages to SampleQ1 and when I run ShowQueues:
The queue.messages.MaxDepth metric might be helpful here. You can browse the available metrics and notifications in the Sonic Management Console as well as graphing metric values.
You could also take a look at the MgmtCLI sample. The following commands show the MaxDepth metric for SampleQ1 on the management broker in a default SonicMQ install:
..\..\..\Mgmt.bat MgmtCLI localhost:2506 Administrator Administrator
You can also enable and capture the MaxDepth metric for all queues at once:
Note that the 'enable' only has to be done once, you can then repeat the 'capture' as needed. This is true even if you close the MgmtCLI sample and launch it again since any metrics that were enabled on the broker in the last session will stay enabled. Use "show enabled" to check what metrics are currently enabled. Once you're finished with the metrics you can disable them.
Thank you guys.