Package io.micronaut.configuration.kafka
Interface ProducerRegistry
- All Known Implementing Classes:
KafkaProducerFactory
public interface ProducerRegistry
A registry of managed
Producer
instances key by id and type.- Since:
- 1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescription<K,
V> @NonNull Producer<K, V> getProducer
(String id, io.micronaut.core.type.Argument<K> keyType, io.micronaut.core.type.Argument<V> valueType) Returns a managed Producer.
-
Method Details
-
getProducer
@NonNull <K,V> @NonNull Producer<K,V> getProducer(String id, io.micronaut.core.type.Argument<K> keyType, io.micronaut.core.type.Argument<V> valueType) Returns a managed Producer.- Type Parameters:
K
- The key generic typeV
- The value generic type- Parameters:
id
- The id of the producer.keyType
- The key typevalueType
- The value type- Returns:
- The producer
-