1 Reply Latest reply on Nov 17, 2004 2:06 AM by Elias Ross

    Browse queue in reverse order? Get message queue count?

    Nicholas Sayer Newbie

      We're happily using a Jboss 4.0 application server to host a JMS queue we use. Our actual use of the queue is straightforward, and is working very well.

      As part of our monitoring strategy, we want to periodically (every minute or so) examine the queue to look at the oldest message, the youngest message and the number of messages in the queue.

      The oldest one is easy - simply get a browser's enumeration and look at the first.

      Is there a way to specify the messageSelector so as to get the queueBrowser to work in reverse order? That would make getting the youngest one easy too.

      The JMX console seems to be easily able to get the QueueDepth. Do I simply cast the Queue object to a org.jboss.mq.server.jmx.Queue and then look for a queueDepth() method that returns an int?