public synchronized boolean addUserToTopic(String topicKey, String userKey, String userName, String channelToken)
            throws TopicAccessException {
        assert topicKey != null && topicKey.trim().length() > 0;
        assert userKey != null && userKey.trim().length() > 0;
        assert userName != null && userName.trim().length() > 0;
        assert channelToken != null && channelToken.trim().length() > 0;

        //ensure the topic exists
        if (!subscribersByTopicKey.containsKey(topicKey)) {
            throw new TopicAccessException("Could not find topic " + topicKey);
        }

        List<SubscriberData> subscribers = loadTopicSubscribers(topicKey);

        boolean alreadyAdded = false;
        for (SubscriberData subscriber : subscribers) {
            if (userKey.equals(subscriber.userKey)) {
                alreadyAdded = true;
                break;
            }
        }

        if (!alreadyAdded) {
            subscribers.add(new SubscriberData(userKey, userName, channelToken, 0));
        }

        return !alreadyAdded;
    }