mNumMessages.getAndAdd(-numDeleted);
    public void action(Server server, QueueAction action, String[] ids) throws ServiceException {        if (ZimbraLog.rmgmt.isDebugEnabled()) ZimbraLog.rmgmt.debug("action=" + action + " ids=" + Arrays.deepToString(ids) + " " + this);    	int done = 0;    	int total = ids.length;    	boolean firstTime = true;    	RemoteManager rm = RemoteManager.getRemoteManager(server);    	IndexReader indexReader = null;    	try {            boolean all = false;            if (ids.length == 1 && ids[0].equals("ALL")) {                // Special case ALL that postsuper supports                clearIndex();                all = true;            } else {                indexReader = IndexReader.open(mIndexPath);            }    		while (done < total) {    			int numQueueIds = Math.min(total - done, MAX_REMOTE_EXECUTION_QUEUEIDS);    			StringBuilder sb = new StringBuilder(128 + (numQueueIds * MAX_LENGTH_OF_QUEUEIDS));    			sb.append("zmqaction " + action.toString() + " " + mQueueName + " ");     			int i;    			for (i = 0; i < numQueueIds; i++) {    				if (i > 0) {    					sb.append(",");    				}                    if (!all) {                        Term toDelete = new Term(QueueAttr.id.toString(), ids[i].toLowerCase());                        int numDeleted = indexReader.delete(toDelete);                        if (ZimbraLog.rmgmt.isDebugEnabled()) ZimbraLog.rmgmt.debug("deleting term:" + toDelete + ", docs deleted=" + numDeleted);                    }    				sb.append(ids[done + i].toUpperCase());    			}    			done = i;    			//System.out.println("will execute action command: " + sb.toString());    			RemoteResult rr = rm.execute(sb.toString());    		}    	} catch (IOException ioe) {    		throw ServiceException.FAILURE("exception occurred performing queue action", ioe);    	} finally {    		if (indexReader != null) {    			try {    				indexReader.close();    			} catch  (IOException ioe) {    				ZimbraLog.rmgmt.warn("exception occured closing index reader during action", ioe);    			}    		}    	}    }