@Factory public class DefaultProducerFactory extends java.lang.Object implements ProducerFactory
ProducerFactory
used for creating producer.Constructor and Description |
---|
DefaultProducerFactory() |
Modifier and Type | Method and Description |
---|---|
<K,V> Producer<K,V> |
createProducer(java.util.Properties config,
Serializer<K> ks,
Serializer<V> vs)
Creates kafka producer, could be overridden for further control.
|
@NonNull public <K,V> Producer<K,V> createProducer(java.util.Properties config, Serializer<K> ks, Serializer<V> vs)
createProducer
in interface ProducerFactory
K
- key typeV
- value typeconfig
- properties for producerks
- key serializervs
- value serializer