Package org.apache.kafka.streams
Interface KafkaClientSupplier
public interface KafkaClientSupplier
KafkaClientSupplier can be used to provide custom Kafka clients to a KafkaStreams instance.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.apache.kafka.clients.admin.AdminCreate anAdminwhich is used for internal topic management.org.apache.kafka.clients.consumer.Consumer<byte[], byte[]> getConsumer(Map<String, Object> config) Create aConsumerwhich is used to read records of source topics.org.apache.kafka.clients.consumer.Consumer<byte[], byte[]> getGlobalConsumer(Map<String, Object> config) Create aConsumerwhich is used to consume records forGlobalKTable.org.apache.kafka.clients.producer.Producer<byte[], byte[]> getProducer(Map<String, Object> config) Create aProducerwhich is used to write records to sink topics.org.apache.kafka.clients.consumer.Consumer<byte[], byte[]> getRestoreConsumer(Map<String, Object> config) Create aConsumerwhich is used to read records to restoreStateStores.
-
Method Details
-
getAdmin
Create anAdminwhich is used for internal topic management.- Parameters:
config- Supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of
Admin
-
getProducer
Create aProducerwhich is used to write records to sink topics.- Parameters:
config-producer configwhich is supplied by thePropertiesgiven to theKafkaStreamsinstance- Returns:
- an instance of Kafka producer
-
getConsumer
Create aConsumerwhich is used to read records of source topics.- Parameters:
config-consumer configwhich is supplied by thePropertiesgiven to theKafkaStreamsinstance- Returns:
- an instance of Kafka consumer
-
getRestoreConsumer
org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> getRestoreConsumer(Map<String, Object> config) Create aConsumerwhich is used to read records to restoreStateStores.- Parameters:
config-restore consumer configwhich is supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of Kafka consumer
-
getGlobalConsumer
org.apache.kafka.clients.consumer.Consumer<byte[],byte[]> getGlobalConsumer(Map<String, Object> config) Create aConsumerwhich is used to consume records forGlobalKTable.- Parameters:
config-global consumer configwhich is supplied by thePropertiesgiven to theKafkaStreams- Returns:
- an instance of Kafka consumer
-