Package io.micronaut.configuration.kafka
Class KafkaConsumerFactory
java.lang.Object
io.micronaut.configuration.kafka.KafkaConsumerFactory
A factory class for creating Kafka
Consumer
instances.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<K,
V> Consumer<K, V> createConsumer
(AbstractKafkaConsumerConfiguration<K, V> consumerConfiguration) Creates a newKafkaConsumer
for the given configuration.
-
Constructor Details
-
KafkaConsumerFactory
public KafkaConsumerFactory()
-
-
Method Details
-
createConsumer
@Prototype public <K,V> Consumer<K,V> createConsumer(@Parameter AbstractKafkaConsumerConfiguration<K, V> consumerConfiguration) Creates a newKafkaConsumer
for the given configuration.- Type Parameters:
K
- The key typeV
- The value type- Parameters:
consumerConfiguration
- The consumer configuration- Returns:
- The consumer
-