public DistributionQueue getQueue()

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


    public DistributionQueue getQueue(String pubAgentName, String queueName) {
        if (queueName.endsWith("-error")) {
            return getErrorQueue(pubAgentName, queueName);
        } else {
            QueueState state = callback.getQueueState(pubAgentName, queueName);
            if (state == null) {
                return null;
            }
            long minOffset = state.getLastProcessedOffset() + 1; // Start from offset after last processed
            OffsetQueue<DistributionQueueItem> agentQueue = getOffsetQueue(pubAgentName, minOffset);
            Throwable error = queueErrors.getError(pubAgentName, queueName);
            return new PubQueue(queueName, agentQueue.getMinOffsetQueue(minOffset), state.getHeadRetries(), error, state.getClearCallback());
        }
    }