Class ApacheKafkaConsumerAdapterFactory

    • Constructor Detail

      • ApacheKafkaConsumerAdapterFactory

        public ApacheKafkaConsumerAdapterFactory()
    • Method Detail

      • create

        public ApacheKafkaConsumerAdapter create​(VeniceProperties veniceProperties,
                                                 boolean isKafkaConsumerOffsetCollectionEnabled,
                                                 PubSubMessageDeserializer pubSubMessageDeserializer,
                                                 java.lang.String consumerName)
        Specified by:
        create in interface PubSubConsumerAdapterFactory<PubSubConsumerAdapter>
        Parameters:
        veniceProperties - A copy of venice properties. Relevant consumer configs will be extracted from veniceProperties using prefix matching. For example, to construct kafka consumer configs that start with "kafka." prefix will be used.
        isKafkaConsumerOffsetCollectionEnabled - A flag to enable collection of offset or not.
        pubSubMessageDeserializer - To deserialize the raw byte records into PubSubMessages to process.
        consumerName - Name of the consumer. If not null, it will be used to set the context for consumer thread.
        Returns:
        Returns an instance of a consumer adapter
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException