Interface ProducerFactory

All Known Implementing Classes:
DefaultProducerFactory

public interface ProducerFactory
A factory class for creating Kafka Producer instances.
Since:
5.0.0
Author:
milanspre
  • Method Summary

    Modifier and Type
    Method
    Description
    <K, V> @NonNull Producer<K,V>
    Creates kafka producer, could be overridden for further control.
  • Method Details

    • createProducer

      @NonNull <K, V> @NonNull Producer<K,V> createProducer(Properties config, Serializer<K> ks, Serializer<V> vs)
      Creates kafka producer, could be overridden for further control.
      Type Parameters:
      K - key type
      V - value type
      Parameters:
      config - properties for producer
      ks - key serializer
      vs - value serializer
      Returns:
      new instance of producer
      Since:
      5.0.0