Class SimpleKafkaListenerEndpoint<K,​V>

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean, org.springframework.kafka.config.KafkaListenerEndpoint

    public class SimpleKafkaListenerEndpoint<K,​V>
    extends Object
    implements org.springframework.kafka.config.KafkaListenerEndpoint, org.springframework.beans.factory.InitializingBean
    Author:
    Filip Hrisafov
    • Field Detail

      • groupId

        protected String groupId
      • topicPattern

        protected Pattern topicPattern
      • topicPartitions

        protected Collection<org.springframework.kafka.support.TopicPartitionOffset> topicPartitions
      • clientIdPrefix

        protected String clientIdPrefix
      • concurrency

        protected Integer concurrency
      • consumerProperties

        protected Properties consumerProperties
      • splitIterables

        protected boolean splitIterables
      • messageListener

        protected org.springframework.kafka.listener.GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,​V>> messageListener
    • Constructor Detail

      • SimpleKafkaListenerEndpoint

        public SimpleKafkaListenerEndpoint()
    • Method Detail

      • setMessageListener

        public void setMessageListener​(org.springframework.kafka.listener.GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,​V>> messageListener)
      • getMessageListener

        public org.springframework.kafka.listener.GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,​V>> getMessageListener()
      • getId

        public String getId()
        Specified by:
        getId in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setId

        public void setId​(String id)
      • getGroupId

        public String getGroupId()
        Specified by:
        getGroupId in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setGroupId

        public void setGroupId​(String groupId)
      • getGroup

        public String getGroup()
        Specified by:
        getGroup in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • getTopics

        public Collection<String> getTopics()
        Specified by:
        getTopics in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • getTopicPartitionsToAssign

        public org.springframework.kafka.support.TopicPartitionOffset[] getTopicPartitionsToAssign()
        Specified by:
        getTopicPartitionsToAssign in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setTopicPartitions

        public void setTopicPartitions​(Collection<org.springframework.kafka.support.TopicPartitionOffset> topicPartitions)
      • getTopicPattern

        public Pattern getTopicPattern()
        Specified by:
        getTopicPattern in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setTopicPattern

        public void setTopicPattern​(Pattern topicPattern)
      • getClientIdPrefix

        public String getClientIdPrefix()
        Specified by:
        getClientIdPrefix in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setClientIdPrefix

        public void setClientIdPrefix​(String clientIdPrefix)
      • getConcurrency

        public Integer getConcurrency()
        Specified by:
        getConcurrency in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setConcurrency

        public void setConcurrency​(Integer concurrency)
      • getAutoStartup

        public Boolean getAutoStartup()
        Specified by:
        getAutoStartup in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • getConsumerProperties

        public Properties getConsumerProperties()
        Specified by:
        getConsumerProperties in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setConsumerProperties

        public void setConsumerProperties​(Properties consumerProperties)
      • setupListenerContainer

        public void setupListenerContainer​(org.springframework.kafka.listener.MessageListenerContainer listenerContainer,
                                           org.springframework.kafka.support.converter.MessageConverter messageConverter)
        Specified by:
        setupListenerContainer in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • isSplitIterables

        public boolean isSplitIterables()
        Specified by:
        isSplitIterables in interface org.springframework.kafka.config.KafkaListenerEndpoint
      • setSplitIterables

        public void setSplitIterables​(boolean splitIterables)
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception