Class DefaultVertxKafkaClientFactory
- java.lang.Object
-
- org.apache.camel.component.vertx.kafka.DefaultVertxKafkaClientFactory
-
- All Implemented Interfaces:
VertxKafkaClientFactory
public class DefaultVertxKafkaClientFactory extends Object implements VertxKafkaClientFactory
Default implementation for interface. Creates default VertX and instances.
-
-
Constructor Summary
Constructors Constructor Description DefaultVertxKafkaClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBootstrapBrokers(VertxKafkaConfiguration configuration)URL of the Kafka brokers to use.<K,V>
io.vertx.kafka.client.consumer.KafkaConsumer<K,V>getVertxKafkaConsumer(io.vertx.core.Vertx vertx, Properties config)Creates a new instance of theKafkaConsumerclass.<K,V>
io.vertx.kafka.client.producer.KafkaProducer<K,V>getVertxKafkaProducer(io.vertx.core.Vertx vertx, Properties config)Creates a new instance of theKafkaProducerclass.
-
-
-
Method Detail
-
getVertxKafkaConsumer
public <K,V> io.vertx.kafka.client.consumer.KafkaConsumer<K,V> getVertxKafkaConsumer(io.vertx.core.Vertx vertx, Properties config)Description copied from interface:VertxKafkaClientFactoryCreates a new instance of theKafkaConsumerclass.- Specified by:
getVertxKafkaConsumerin interfaceVertxKafkaClientFactory- Parameters:
vertx- vertx instanceconfig- The consumer configs.- Returns:
- an instance of Kafka consumer.
-
getVertxKafkaProducer
public <K,V> io.vertx.kafka.client.producer.KafkaProducer<K,V> getVertxKafkaProducer(io.vertx.core.Vertx vertx, Properties config)Description copied from interface:VertxKafkaClientFactoryCreates a new instance of theKafkaProducerclass.- Specified by:
getVertxKafkaProducerin interfaceVertxKafkaClientFactory- Parameters:
vertx- vertx instanceconfig- The producer configs.- Returns:
- an instance of Kafka producer.
-
getBootstrapBrokers
public String getBootstrapBrokers(VertxKafkaConfiguration configuration)
Description copied from interface:VertxKafkaClientFactoryURL of the Kafka brokers to use. The format is host1:port1,host2:port2, and the list can be a subset of brokers or a VIP pointing to a subset of brokers. This option is known as bootstrap.servers in the Kafka documentation.- Specified by:
getBootstrapBrokersin interfaceVertxKafkaClientFactory- Parameters:
configuration- the configuration
-
-