Interface PubSubConsumerAdapterFactory<ADAPTER extends PubSubConsumerAdapter>

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable
    All Known Implementing Classes:
    ApacheKafkaConsumerAdapterFactory

    public interface PubSubConsumerAdapterFactory<ADAPTER extends PubSubConsumerAdapter>
    extends java.io.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 Detail

      • create

        ADAPTER create​(VeniceProperties veniceProperties,
                       boolean isOffsetCollectionEnabled,
                       PubSubMessageDeserializer pubSubMessageDeserializer,
                       java.lang.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 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
      • getName

        java.lang.String getName()