Class ApacheKafkaConsumerAdapterFactory
- java.lang.Object
-
- com.linkedin.venice.pubsub.adapter.kafka.consumer.ApacheKafkaConsumerAdapterFactory
-
- All Implemented Interfaces:
PubSubConsumerAdapterFactory<PubSubConsumerAdapter>
,java.io.Closeable
,java.lang.AutoCloseable
public class ApacheKafkaConsumerAdapterFactory extends java.lang.Object implements PubSubConsumerAdapterFactory<PubSubConsumerAdapter>
-
-
Constructor Summary
Constructors Constructor Description ApacheKafkaConsumerAdapterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ApacheKafkaConsumerAdapter
create(VeniceProperties veniceProperties, boolean isKafkaConsumerOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, java.lang.String consumerName)
java.lang.String
getName()
-
-
-
Method Detail
-
create
public ApacheKafkaConsumerAdapter create(VeniceProperties veniceProperties, boolean isKafkaConsumerOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, java.lang.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
public java.lang.String getName()
- Specified by:
getName
in interfacePubSubConsumerAdapterFactory<PubSubConsumerAdapter>
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-