long getOffset()

in src/main/java/org/apache/sling/distribution/journal/kafka/KafkaClientProvider.java [269:278]


        long getOffset(KafkaConsumer<String, String> consumer, TopicPartition topicPartition) {
            Collection<TopicPartition> partitions = singleton(topicPartition);
            if (reset == Reset.earliest) {
                return consumer.beginningOffsets(partitions).get(topicPartition) + offset;
            } else if (reset == Reset.latest) {
                return consumer.endOffsets(partitions).get(topicPartition) + offset;
            } else {
                return offset;
            }
        }