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 String
getBootstrapBrokers(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 theKafkaConsumer
class.<K,V>
io.vertx.kafka.client.producer.KafkaProducer<K,V>getVertxKafkaProducer(io.vertx.core.Vertx vertx, Properties config)
Creates a new instance of theKafkaProducer
class.
-
-
-
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:VertxKafkaClientFactory
Creates a new instance of theKafkaConsumer
class.- Specified by:
getVertxKafkaConsumer
in 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:VertxKafkaClientFactory
Creates a new instance of theKafkaProducer
class.- Specified by:
getVertxKafkaProducer
in interfaceVertxKafkaClientFactory
- Parameters:
vertx
- vertx instanceconfig
- The producer configs.- Returns:
- an instance of Kafka producer.
-
getBootstrapBrokers
public String getBootstrapBrokers(VertxKafkaConfiguration configuration)
Description copied from interface:VertxKafkaClientFactory
URL 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:
getBootstrapBrokers
in interfaceVertxKafkaClientFactory
- Parameters:
configuration
- the configuration
-
-