code: @Override
  	public int registerTopicSession(String topic, Session session) throws IllegalAccessException {
  		if (isInconsistenceContext(topic, session)) {
  			return 0;
  		}
  		Collection<Session> sessions;
  		if (map.containsKey(topic)) {
  			sessions = map.get(topic);
  		} else {
  			sessions = Collections.synchronizedCollection(new ArrayList<Session>());
  			map.put(topic, sessions);
  		}
  		topicAccessManager.checkAccessTopic(userContextFactory.getUserContext(session.getId()), topic);
  		logger.debug("'{}' subscribe to '{}'", session.getId(), topic);
  		if (session.isOpen()) {
  			sessions.add(session);
  		}
  		return getNumberSubscribers(topic);
  	}
docs: Register session for topic
  
  @param topic
  @param session
  @return int : number subscribers
  @throws IllegalAccessException