in src/main/java/com/epam/digital/data/platform/starter/kafka/service/StartupKafkaTopicsCreator.java [143:153]
private Collection<NewTopic> getNewTopics(Set<String> requiredTopics) {
return requiredTopics.stream()
.map(
topicName ->
new NewTopic(
topicName,
kafkaProperties.getTopicProperties().getCreation().getNumPartitions(),
kafkaProperties.getTopicProperties().getCreation().getReplicationFactor()))
.map(topic -> topic.configs(getRetentionPolicy(topic.name())))
.collect(Collectors.toSet());
}