in src/main/java/org/apache/sling/distribution/journal/kafka/KafkaClientProvider.java [153:163]
public void assertTopic(String topic) throws MessagingException {
Map<String, List<PartitionInfo>> topics;
try (KafkaConsumer<String, String> consumer = createConsumer(StringDeserializer.class, Reset.latest)) {
topics = consumer.listTopics();
} catch (Exception e) {
throw new MessagingException(format("Unable to load topic stats for %s", topic), e);
}
if (! topics.containsKey(topic)) {
throw new MessagingException(format("Topic %s does not exist", topic));
}
}