title: How can I create many kafka topics during spring-boot application start up?
body: <p>I have this configuration:</p>
  
  <pre><code>@Configuration
  public class KafkaTopicConfig {
  
      private final TopicProperties topics;
  
      public KafkaTopicConfig(TopicProperties topics) {
          this.topics = topics;
      }
  
      @Bean
      public NewTopic newTopicImportCharge() {
          TopicProperties.Topic topic = topics.getTopicNameByType(MessageType.IMPORT_CHARGES.name());
          return new NewTopic(topic.getTopicName(), topic.getNumPartitions(), topic.getReplicationFactor());
      }
  
      @Bean
      public NewTopic newTopicImportPayment() {
          TopicProperties.Topic topic = topics.getTopicNameByType(MessageType.IMPORT_PAYMENTS.name());
          return new NewTopic(topic.getTopicName(), topic.getNumPartitions(), topic.getReplicationFactor());
      }
  
      @Bean
      public NewTopic newTopicImportCatalog() {
          TopicProperties.Topic topic = topics.getTopicNameByType(MessageType.IMPORT_CATALOGS.name());
          return new NewTopic(topic.getTopicName(), topic.getNumPartitions(), topic.getReplicationFactor());
      }
  }
  </code></pre>
  
  <p>I can add 10 differents topics to  <code>TopicProperties</code>. And I don't want create each similar bean manually.  Does some way exist for create all topic in <strong>spring-kafka</strong> or only <strong>spring</strong>? </p>