generator.server.springboot.broker.kafka.KafkaConfiguration.mustache Maven / Gradle / Ivy
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