Interface PubSubProducerAdapterFactory<ADAPTER extends PubSubProducerAdapter>

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ApacheKafkaProducerAdapterFactory

public interface PubSubProducerAdapterFactory<ADAPTER extends PubSubProducerAdapter> extends 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 Details

    • create

      ADAPTER create(VeniceProperties veniceProperties, String producerName, 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

      String getName()