Package io.micronaut.configuration.kafka
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 TypeMethodDescription<K,
V> @NonNull Producer<K, V> createProducer
(Properties config, Serializer<K> ks, Serializer<V> vs) 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 typeV
- value type- Parameters:
config
- properties for producerks
- key serializervs
- value serializer- Returns:
- new instance of producer
- Since:
- 5.0.0
-