This content has been marked as final.
Show 3 replies
-
1. Re: monitoring msg updates via queues
ssjboss May 1, 2008 3:54 AM (in response to cuthbe)please try this
qbrowser = qsession.createBrowser(queue);
Enumeration e = qbrowser.getEnumeration(); // gets list of messages.
while (e.hasMoreElements()) {
// counter variable
}
-------
SS -
2. Re: monitoring msg updates via queues
timfox May 1, 2008 4:01 AM (in response to cuthbe)"ssjboss" wrote:
please try this
qbrowser = qsession.createBrowser(queue);
Enumeration e = qbrowser.getEnumeration(); // gets list of messages.
while (e.hasMoreElements()) {
// counter variable
}
-------
SS
That's really not a good idea - traversing a queue with a browser to find out number of messages is going to be very slow.
Why not just use the JMX management interface? See message counters in the user guide. It's all in the documentation! -
3. Re: monitoring msg updates via queues
ssjboss May 1, 2008 4:08 AM (in response to cuthbe)thanks , i will also use this