Package com.linkedin.venice.pubsub
Interface PubSubConsumerAdapterFactory<ADAPTER extends PubSubConsumerAdapter>
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
ApacheKafkaConsumerAdapterFactory
public interface PubSubConsumerAdapterFactory<ADAPTER extends PubSubConsumerAdapter>
extends Closeable
Generic consumer factory interface.
A pus-sub specific concrete implementation of this interface should be provided to be able to create
and instantiate consumers for that system.
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(VeniceProperties veniceProperties, boolean isOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) getName()
-
Method Details
-
create
ADAPTER create(VeniceProperties veniceProperties, boolean isOffsetCollectionEnabled, PubSubMessageDeserializer pubSubMessageDeserializer, String consumerName) - 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.isOffsetCollectionEnabled
- 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
String getName()
-