All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.broker.kafka.KafkaConfiguration.mustache Maven / Gradle / Ivy

There is a newer version: 1.23.0
Show newest version
package {{packageName}}.wire.kafka.infrastructure.config;

import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
class KafkaConfiguration {

  @Bean
  public KafkaConsumer kafkaConsumer(KafkaProperties kafkaProperties) {
    return new KafkaConsumer<>(kafkaProperties.getConsumer());
  }

  @Bean
  public KafkaProducer kafkaProducer(KafkaProperties kafkaProperties) {
    return new KafkaProducer<>(kafkaProperties.getProducer());
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy