Package io.micronaut.configuration.kafka
Class DefaultProducerFactory
java.lang.Object
io.micronaut.configuration.kafka.DefaultProducerFactory
- All Implemented Interfaces:
ProducerFactory
A default implementation of
ProducerFactory
used for creating producer.- Since:
- 5.0.0
- Author:
- milanspre
-
Constructor Summary
-
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.
-
Constructor Details
-
DefaultProducerFactory
public DefaultProducerFactory()
-
-
Method Details
-
createProducer
@NonNull public <K,V> @NonNull Producer<K,V> createProducer(Properties config, Serializer<K> ks, Serializer<V> vs) Creates kafka producer, could be overridden for further control.- Specified by:
createProducer
in interfaceProducerFactory
- 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
-