Class ApacheKafkaConsumerAdapterFactory
java.lang.Object
com.linkedin.venice.pubsub.adapter.kafka.consumer.ApacheKafkaConsumerAdapterFactory
- All Implemented Interfaces:
PubSubConsumerAdapterFactory<PubSubConsumerAdapter>
,Closeable
,AutoCloseable
public class ApacheKafkaConsumerAdapterFactory
extends Object
implements PubSubConsumerAdapterFactory<PubSubConsumerAdapter>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
create
(VeniceProperties veniceProperties, boolean isKafkaConsumerOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) getName()
-
Constructor Details
-
ApacheKafkaConsumerAdapterFactory
public ApacheKafkaConsumerAdapterFactory()
-
-
Method Details
-
create
public ApacheKafkaConsumerAdapter create(VeniceProperties veniceProperties, boolean isKafkaConsumerOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) - Specified by:
create
in interfacePubSubConsumerAdapterFactory<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 intoPubSubMessage
s 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
-
getName
- Specified by:
getName
in interfacePubSubConsumerAdapterFactory<PubSubConsumerAdapter>
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-