public Set getQueueNames()

in src/main/java/org/apache/sling/distribution/journal/queue/impl/PubQueueProviderImpl.java [137:158]


    public Set<String> getQueueNames(String pubAgentName) {
        // Queues names are generated only for the subscriber agents which are
        // alive and are subscribed to the publisher agent name (pubAgentName).
        // The queue names match the subscriber agent identifier (subAgentId).
        //
        // If errors queues are enabled, an error queue name is generated which
        // follows the pattern "%s-error". The pattern is deliberately different
        // from the SCD on Jobs one ("error-%s") as we don't want to support
        // the UI ability to retry items from the error queue.
        Set<String> queueNames = new HashSet<>();
        for (String subAgentId : callback.getSubscribedAgentIds(pubAgentName)) {
            queueNames.add(subAgentId);
            QueueState subState = callback.getQueueState(pubAgentName, subAgentId);
            if (subState != null) {
                boolean errorQueueEnabled = (subState.getMaxRetries() >= 0);
                if (errorQueueEnabled) {
                    queueNames.add(String.format("%s-error", subAgentId));
                }
            }
        }
        return queueNames;
    }