Package org.apache.camel.component.kafka
Class DefaultKafkaClientFactory
java.lang.Object
org.apache.camel.component.kafka.DefaultKafkaClientFactory
- All Implemented Interfaces:
KafkaClientFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBrokers(KafkaConfiguration configuration) URL of the Kafka brokers to use.org.apache.kafka.clients.consumer.ConsumergetConsumer(Properties kafkaProps) Creates a new instance of the KafkaConsumerclass.org.apache.kafka.clients.producer.ProducergetProducer(Properties kafkaProps) Creates a new instance of the KafkaProducerclass.
-
Constructor Details
-
DefaultKafkaClientFactory
public DefaultKafkaClientFactory()
-
-
Method Details
-
getProducer
Description copied from interface:KafkaClientFactoryCreates a new instance of the KafkaProducerclass.- Specified by:
getProducerin interfaceKafkaClientFactory- Parameters:
kafkaProps- The producer configs.- Returns:
- an instance of Kafka producer.
-
getConsumer
Description copied from interface:KafkaClientFactoryCreates a new instance of the KafkaConsumerclass.- Specified by:
getConsumerin interfaceKafkaClientFactory- Parameters:
kafkaProps- The consumer configs.- Returns:
- an instance of Kafka consumer.
-
getBrokers
Description copied from interface:KafkaClientFactoryURL 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:
getBrokersin interfaceKafkaClientFactory- Parameters:
configuration- the configuration
-