Interface PubSubProducerAdapterFactory<ADAPTER extends PubSubProducerAdapter>

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

    public interface PubSubProducerAdapterFactory<ADAPTER extends PubSubProducerAdapter>
    extends java.io.Closeable
    Generic producer factory interface. A pus-sub specific concrete implementation of this interface should be provided to be able to create and instantiate producers for that system.
    • Method Detail

      • create

        ADAPTER create​(VeniceProperties veniceProperties,
                       java.lang.String producerName,
                       java.lang.String targetBrokerAddress)
        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.
        targetBrokerAddress - 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
      • getName

        java.lang.String getName()