Class KafkaTestConfiguration<K,​V>

  • Type Parameters:
    K - Key type
    V - Value type

    public class KafkaTestConfiguration<K,​V>
    extends java.lang.Object
    Kafka Test configuration
    Since:
    1.0.0
    Author:
    Mercy
    • Constructor Summary

      Constructors 
      Constructor Description
      KafkaTestConfiguration​(org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter, org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.ProducerListener<K,​V>> kafkaProducerListener)  
    • Constructor Detail

      • KafkaTestConfiguration

        public KafkaTestConfiguration​(org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter,
                                      org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.ProducerListener<K,​V>> kafkaProducerListener)
    • Method Detail

      • kafkaTemplate

        @Bean
        public org.springframework.kafka.core.KafkaTemplate<K,​V> kafkaTemplate​(org.springframework.kafka.test.EmbeddedKafkaBroker embeddedKafka)
      • messageListenerContainer

        @Bean
        public org.springframework.kafka.listener.GenericMessageListenerContainer<K,​V> messageListenerContainer​(org.springframework.kafka.test.EmbeddedKafkaBroker embeddedKafka,
                                                                                                                      CompositeMessageListener<K,​V> compositeMessageListener)