Class ApacheKafkaProducerAdapterFactory

    • Constructor Detail

      • ApacheKafkaProducerAdapterFactory

        public ApacheKafkaProducerAdapterFactory()
    • Method Detail

      • create

        public ApacheKafkaProducerAdapter create​(VeniceProperties veniceProperties,
                                                 java.lang.String producerName,
                                                 java.lang.String brokerAddressToOverride)
        Specified by:
        create in interface PubSubProducerAdapterFactory<ApacheKafkaProducerAdapter>
        Parameters:
        veniceProperties - A copy of venice properties. Relevant producer configs will be extracted from veniceProperties using prefix matching. For example, to construct kafka producer configs that start with "kafka." prefix will be used.
        producerName - Name of the producer. If not null, it will be used to set the context for producer thread.
        brokerAddressToOverride - Broker address to use when creating a producer. If this value is null, local broker address present in veniceProperties will be used.
        Returns:
        Returns an instance of a producer adapter
      • close

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