0 Replies Latest reply on Jun 15, 2004 1:27 PM by amendonca

    DurableMessageCount MBean attribute

    amendonca Newbie

      Hello all,

      I'm using JBoss 3.0.8, running on Windows 2000, and this message is related to the JBoss JMS implementation.

      Could someone please explain to me what exactly is the DurableMessageCount MBean attribute? (reachable from one of the topics under "jboss.mq.destination" in the JMX console)

      In the source code I can see this:

      (org.jboss.mq.server.JMSTopic)
      
      > public int getDurableMessageCount()
      > {
      > return calculateMessageCount(getPersistentQueues());
      > }

      plus
      (org.jboss.mq.server.JMSTopic)
      
      > private int calculateMessageCount(ArrayList queues)
      > {
      > int count = 0;
      > for (Iterator i = queues.listIterator(); i.hasNext();)
      > {
      > BasicQueue queue = (BasicQueue) i.next();
      > count += queue.getQueueDepth();
      > }
      > return count;
      > }

      plus
      (org.jboss.mq.server.BasicQueue)
      
      > public int getQueueDepth() {
      > return messages.size();
      > }

      and finally
      (org.jboss.mq.server.BasicQueue)
      > //List of messages waiting to beI dispatched> SortedSet messages = new TreeSet();


      The problem seems to be that there is no evidence that any messages are being persisted, although the counter keeps growing because of a JMS-based heartbeat mechanism we implemented.

      My question is basically if the aforementioned counter can possibly be counting messages that are not necessarily persisted, or messages that are not going to be delivered to durable subscribers.

      Thanks in advance for any help.

      Andre Mendonca