class KafkaOperations implements AutoCloseable {

    public TailOffsets getTailOffsets(final String topic) {
        // Determine which partitions exist on the topic
        final TopicDetails topicDetails = getTopicDetails(topic);
        final List<Integer> partitions = topicDetails.getPartitions()
            .stream()
            .map(PartitionDetails::getPartition)
            .collect(Collectors.toList());

        // Call method for specific partitions.
        return getTailOffsets(topic, partitions);
    }

    public  KafkaOperations(final AdminClient adminClient, final KafkaConsumer<String, String> consumerClient);

}