code: public int getConsumersCount()
      {
      	synchronized (sessions)
  		{
      		if (sessions.isEmpty())
      			return 0;
      
      		int total = 0;
      		Iterator<AbstractSession>sessionsIterator = sessions.values().iterator();
  			while (sessionsIterator.hasNext())
  			{
  				AbstractSession session = sessionsIterator.next();
  				total += session.getConsumersCount();
  			}
  			return total;
  		}
      }
docs: Get the number of active producers for this connection
  @return the number of active producers for this connection