public static void unregister(String clientId, String sid, int maxMessages) {
		String id = clientId + "_" + sid;
		Subscription sub = subList.get(id);
		Subscriber subscriber = sub.subscribers.get(id);
		if (subscriber != null) {
			if (maxMessages == -1) { sub.subscribers.remove(id); }
			else { subscriber.setMaxMessages(maxMessages); }
		}
		else {
			for (Iterator<Entry<String, Subscriber>> iter = sub.subscribers.entrySet().iterator(); iter.hasNext();) {
				subscriber = iter.next().getValue();
				if (subscriber.isQueueGroup()) {
					for (Iterator<Subscriber> qiter = subscriber.queue.iterator(); qiter.hasNext();) {
						Subscriber qsubscriber = qiter.next();
						if (qsubscriber.id.equals(id)) {
							if (maxMessages == -1) { subscriber.queue.remove(qsubscriber); }
							else { qsubscriber.setMaxMessages(maxMessages);}
							break;
						}
					}
				}
			}
		}
	}