code: public int getNumberOfQueuedMessages()
    {
      //this value is the number of requests in the AOValue state
      int count = 0;
      
      NonLockingCursor cursor = null;
      
      try
      {
        cursor = _aoStream.itemStream.newNonLockingItemCursor(null);
        cursor.allowUnavailableItems();
        AOValue item = (AOValue)cursor.next();
        while(item != null)
        {
          count ++;
          item = (AOValue)cursor.next();
        }      
      }
      catch (MessageStoreException e)
      {
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.runtime.RemoteConsumerTransmit.getNumberOfQueuedMessages",
          "1:340:1.44", 
          this);
        SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] { "com.ibm.ws.sib.processor.runtime.RemoteConsumerTransmit.getNumberOfQueuedMessages", 
                         "1:344:1.44", 
                         SIMPUtils.getStackTrace(e) });
        count = -1;
          
      }
      finally
      {
        if (cursor != null)
          cursor.finished();     
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "getNumberOfQueuedMessages", new Integer(count));
      return count;
    }
docs: /* (non-Javadoc)
  @see com.ibm.ws.sib.processor.runtime.SIMPRemoteConsumerTransmitControllable#getNumberOfQueuedMessages()